aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/video/sn9c102/sn9c102_hv7131r.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/media/video/sn9c102/sn9c102_hv7131r.c')
-rw-r--r--drivers/media/video/sn9c102/sn9c102_hv7131r.c8
1 files changed, 2 insertions, 6 deletions
diff --git a/drivers/media/video/sn9c102/sn9c102_hv7131r.c b/drivers/media/video/sn9c102/sn9c102_hv7131r.c
index 5a495baa5f95..0fc401223cfc 100644
--- a/drivers/media/video/sn9c102/sn9c102_hv7131r.c
+++ b/drivers/media/video/sn9c102/sn9c102_hv7131r.c
@@ -44,7 +44,6 @@ static int hv7131r_init(struct sn9c102_device* cam)
44 {0xb0, 0x2b}, {0xc0, 0x2c}, 44 {0xb0, 0x2b}, {0xc0, 0x2c},
45 {0xd0, 0x2d}, {0xe0, 0x2e}, 45 {0xd0, 0x2d}, {0xe0, 0x2e},
46 {0xf0, 0x2f}, {0xff, 0x30}); 46 {0xf0, 0x2f}, {0xff, 0x30});
47
48 break; 47 break;
49 case BRIDGE_SN9C105: 48 case BRIDGE_SN9C105:
50 case BRIDGE_SN9C120: 49 case BRIDGE_SN9C120:
@@ -254,7 +253,7 @@ static int hv7131r_set_pix_format(struct sn9c102_device* cam,
254} 253}
255 254
256 255
257static struct sn9c102_sensor hv7131r = { 256static const struct sn9c102_sensor hv7131r = {
258 .name = "HV7131R", 257 .name = "HV7131R",
259 .maintainer = "Luca Risolia <luca.risolia@studio.unibo.it>", 258 .maintainer = "Luca Risolia <luca.risolia@studio.unibo.it>",
260 .supported_bridge = BRIDGE_SN9C103 | BRIDGE_SN9C105 | BRIDGE_SN9C120, 259 .supported_bridge = BRIDGE_SN9C103 | BRIDGE_SN9C105 | BRIDGE_SN9C120,
@@ -350,11 +349,8 @@ int sn9c102_probe_hv7131r(struct sn9c102_device* cam)
350 {0x34, 0x01}, {0x20, 0x17}, 349 {0x34, 0x01}, {0x20, 0x17},
351 {0x34, 0x01}, {0x46, 0x01}); 350 {0x34, 0x01}, {0x46, 0x01});
352 351
353 if (err)
354 return -EIO;
355
356 devid = sn9c102_i2c_try_read(cam, &hv7131r, 0x00); 352 devid = sn9c102_i2c_try_read(cam, &hv7131r, 0x00);
357 if (devid < 0) 353 if (err || devid < 0)
358 return -EIO; 354 return -EIO;
359 355
360 if (devid != 0x02) 356 if (devid != 0x02)