diff options
author | Erik Andr?n <erik.andren@gmail.com> | 2009-01-13 19:44:03 +0100 |
---|---|---|
committer | Erik Andr?n <erik.andren@gmail.com> | 2009-01-13 19:44:03 +0100 |
commit | 381435e02c2d0614ac0dcdcb8a5aebb9b47682f7 (patch) | |
tree | cbc794b6de189559afe0ee6d5be2544b5bea4290 | |
parent | 1396fc29fa670cab79c5d2740149fb8c1f447e6b (diff) | |
download | mediapointer-dvb-s2-381435e02c2d0614ac0dcdcb8a5aebb9b47682f7.tar.gz mediapointer-dvb-s2-381435e02c2d0614ac0dcdcb8a5aebb9b47682f7.tar.bz2 |
gspca - m5602-s5k4aa: Try to use proper read-modify-write of the vflip/hflip
From: Erik Andr?n <erik.andren@gmail.com>
Priority: normal
Signed-off-by: Erik Andr?n <erik.andren@gmail.com>
-rw-r--r-- | linux/drivers/media/video/gspca/m5602/m5602_s5k4aa.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/linux/drivers/media/video/gspca/m5602/m5602_s5k4aa.c b/linux/drivers/media/video/gspca/m5602/m5602_s5k4aa.c index 7b1d0602e..003dc469c 100644 --- a/linux/drivers/media/video/gspca/m5602/m5602_s5k4aa.c +++ b/linux/drivers/media/video/gspca/m5602/m5602_s5k4aa.c @@ -376,6 +376,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; @@ -435,6 +439,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) |