]> git.proxmox.com Git - mirror_ubuntu-jammy-kernel.git/commitdiff
V4L/DVB (11527): gspca - m5602-s5k4aa: Try to use proper read-modify-write of the...
authorErik Andr?n <erik.andren@gmail.com>
Tue, 13 Jan 2009 18:44:03 +0000 (15:44 -0300)
committerMauro Carvalho Chehab <mchehab@redhat.com>
Tue, 16 Jun 2009 21:20:32 +0000 (18:20 -0300)
Signed-off-by: Erik Andr?n <erik.andren@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
drivers/media/video/gspca/m5602/m5602_s5k4aa.c

index 41f6956e3af46f28c25cbe4082a9e7530467a786..317bc32e758d75bfb95d332e3824a075ff46427f 100644 (file)
@@ -374,6 +374,10 @@ static int s5k4aa_set_vflip(struct gspca_dev *gspca_dev, __s32 val)
        if (err < 0)
                return err;
 
+       err = m5602_read_sensor(sd, S5K4AA_READ_MODE, &data, 1);
+       if (err < 0)
+               return err;
+
        if (dmi_check_system(s5k4aa_vflip_dmi_table))
                val = !val;
 
@@ -433,6 +437,10 @@ static int s5k4aa_set_hflip(struct gspca_dev *gspca_dev, __s32 val)
        if (err < 0)
                return err;
 
+       err = m5602_read_sensor(sd, S5K4AA_READ_MODE, &data, 1);
+       if (err < 0)
+               return err;
+
        data = ((data & ~S5K4AA_RM_H_FLIP) | ((val & 0x01) << 6));
        err = m5602_write_sensor(sd, S5K4AA_READ_MODE, &data, 1);
        if (err < 0)