diff options
author | Erik Andrén <erik.andren@gmail.com> | 2009-01-28 02:02:49 -0500 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@redhat.com> | 2009-06-16 17:20:49 -0400 |
commit | 52fa70b7f448da8b763e8c2f566d309d7399a20b (patch) | |
tree | daa88a9e7a42105677f18ac0c1c878baa0ddf711 /drivers/media/video/gspca/m5602 | |
parent | 934f78c3069943cf0654a6f809adf0375b078c38 (diff) |
V4L/DVB (11648): gspca - m5602: Remove some needless error checking and add comments
Signed-off-by: Erik Andrén <erik.andren@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/media/video/gspca/m5602')
-rw-r--r-- | drivers/media/video/gspca/m5602/m5602_core.c | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/drivers/media/video/gspca/m5602/m5602_core.c b/drivers/media/video/gspca/m5602/m5602_core.c index ca77dab90750..8ca5643f2c7a 100644 --- a/drivers/media/video/gspca/m5602/m5602_core.c +++ b/drivers/media/video/gspca/m5602/m5602_core.c | |||
@@ -112,18 +112,16 @@ int m5602_read_sensor(struct sd *sd, const u8 address, | |||
112 | if (err < 0) | 112 | if (err < 0) |
113 | return err; | 113 | return err; |
114 | 114 | ||
115 | /* Sensors with registers that only are one byte width are differently read */ | ||
116 | /* FIXME: This works with the ov9650, but has issues with the po1030 */ | ||
115 | if (sd->sensor->i2c_regW == 1) { | 117 | if (sd->sensor->i2c_regW == 1) { |
116 | err = m5602_write_bridge(sd, M5602_XB_I2C_CTRL, len); | 118 | err = m5602_write_bridge(sd, M5602_XB_I2C_CTRL, 1); |
117 | if (err < 0) | 119 | if (err < 0) |
118 | return err; | 120 | return err; |
119 | 121 | ||
120 | err = m5602_write_bridge(sd, M5602_XB_I2C_CTRL, 0x08); | 122 | err = m5602_write_bridge(sd, M5602_XB_I2C_CTRL, 0x08); |
121 | if (err < 0) | ||
122 | return err; | ||
123 | } else { | 123 | } else { |
124 | err = m5602_write_bridge(sd, M5602_XB_I2C_CTRL, 0x18 + len); | 124 | err = m5602_write_bridge(sd, M5602_XB_I2C_CTRL, 0x18 + len); |
125 | if (err < 0) | ||
126 | return err; | ||
127 | } | 125 | } |
128 | 126 | ||
129 | for (i = 0; (i < len) && !err; i++) { | 127 | for (i = 0; (i < len) && !err; i++) { |