diff options
author | Erik Andrén <erik.andren@gmail.com> | 2009-01-28 08:02:49 +0100 |
---|---|---|
committer | Erik Andrén <erik.andren@gmail.com> | 2009-01-28 08:02:49 +0100 |
commit | cd2add238ace8333d560fa90cd3f246a25b91bb0 (patch) | |
tree | 85ebd9a0f56c010289ac9529e8490d0b02a6fdb9 /linux/drivers/media/video/gspca/m5602 | |
parent | 9e835434ce6ebb47cb8fcef4fb4aa78071f37788 (diff) | |
download | mediapointer-dvb-s2-cd2add238ace8333d560fa90cd3f246a25b91bb0.tar.gz mediapointer-dvb-s2-cd2add238ace8333d560fa90cd3f246a25b91bb0.tar.bz2 |
gspca - m5602: Remove some needless error checking and add comments
From: Erik Andrén <erik.andren@gmail.com>
Priority: normal
Signed-off-by: Erik Andrén <erik.andren@gmail.com>
Diffstat (limited to 'linux/drivers/media/video/gspca/m5602')
-rw-r--r-- | linux/drivers/media/video/gspca/m5602/m5602_core.c | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/linux/drivers/media/video/gspca/m5602/m5602_core.c b/linux/drivers/media/video/gspca/m5602/m5602_core.c index ca77dab90..8ca5643f2 100644 --- a/linux/drivers/media/video/gspca/m5602/m5602_core.c +++ b/linux/drivers/media/video/gspca/m5602/m5602_core.c @@ -112,18 +112,16 @@ int m5602_read_sensor(struct sd *sd, const u8 address, if (err < 0) return err; + /* Sensors with registers that only are one byte width are differently read */ + /* FIXME: This works with the ov9650, but has issues with the po1030 */ if (sd->sensor->i2c_regW == 1) { - err = m5602_write_bridge(sd, M5602_XB_I2C_CTRL, len); + err = m5602_write_bridge(sd, M5602_XB_I2C_CTRL, 1); if (err < 0) return err; err = m5602_write_bridge(sd, M5602_XB_I2C_CTRL, 0x08); - if (err < 0) - return err; } else { err = m5602_write_bridge(sd, M5602_XB_I2C_CTRL, 0x18 + len); - if (err < 0) - return err; } for (i = 0; (i < len) && !err; i++) { |