aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media
diff options
context:
space:
mode:
authorErik Andr?n <erik.andren@gmail.com>2009-01-13 13:44:03 -0500
committerMauro Carvalho Chehab <mchehab@redhat.com>2009-06-16 17:20:32 -0400
commita68985d46962305f537380a572903fb78dbe207c (patch)
tree418046770ef1a4a9936a5941695083bcab43797d /drivers/media
parent0746673d21ea53d4bd710b47ad67c413e9510a5a (diff)
V4L/DVB (11527): gspca - m5602-s5k4aa: Try to use proper read-modify-write of the vflip/hflip
Signed-off-by: Erik Andr?n <erik.andren@gmail.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/media')
-rw-r--r--drivers/media/video/gspca/m5602/m5602_s5k4aa.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/drivers/media/video/gspca/m5602/m5602_s5k4aa.c b/drivers/media/video/gspca/m5602/m5602_s5k4aa.c
index 41f6956e3af4..317bc32e758d 100644
--- a/drivers/media/video/gspca/m5602/m5602_s5k4aa.c
+++ b/drivers/media/video/gspca/m5602/m5602_s5k4aa.c
@@ -374,6 +374,10 @@ static int s5k4aa_set_vflip(struct gspca_dev *gspca_dev, __s32 val)
374 if (err < 0) 374 if (err < 0)
375 return err; 375 return err;
376 376
377 err = m5602_read_sensor(sd, S5K4AA_READ_MODE, &data, 1);
378 if (err < 0)
379 return err;
380
377 if (dmi_check_system(s5k4aa_vflip_dmi_table)) 381 if (dmi_check_system(s5k4aa_vflip_dmi_table))
378 val = !val; 382 val = !val;
379 383
@@ -433,6 +437,10 @@ static int s5k4aa_set_hflip(struct gspca_dev *gspca_dev, __s32 val)
433 if (err < 0) 437 if (err < 0)
434 return err; 438 return err;
435 439
440 err = m5602_read_sensor(sd, S5K4AA_READ_MODE, &data, 1);
441 if (err < 0)
442 return err;
443
436 data = ((data & ~S5K4AA_RM_H_FLIP) | ((val & 0x01) << 6)); 444 data = ((data & ~S5K4AA_RM_H_FLIP) | ((val & 0x01) << 6));
437 err = m5602_write_sensor(sd, S5K4AA_READ_MODE, &data, 1); 445 err = m5602_write_sensor(sd, S5K4AA_READ_MODE, &data, 1);
438 if (err < 0) 446 if (err < 0)