aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/video/sn9c102/sn9c102_hv7131d.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/media/video/sn9c102/sn9c102_hv7131d.c')
-rw-r--r--drivers/media/video/sn9c102/sn9c102_hv7131d.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/drivers/media/video/sn9c102/sn9c102_hv7131d.c b/drivers/media/video/sn9c102/sn9c102_hv7131d.c
index 28a861aed044..eaf9ad0dc8a6 100644
--- a/drivers/media/video/sn9c102/sn9c102_hv7131d.c
+++ b/drivers/media/video/sn9c102/sn9c102_hv7131d.c
@@ -144,7 +144,7 @@ static int hv7131d_set_pix_format(struct sn9c102_device* cam,
144} 144}
145 145
146 146
147static struct sn9c102_sensor hv7131d = { 147static const struct sn9c102_sensor hv7131d = {
148 .name = "HV7131D", 148 .name = "HV7131D",
149 .maintainer = "Luca Risolia <luca.risolia@studio.unibo.it>", 149 .maintainer = "Luca Risolia <luca.risolia@studio.unibo.it>",
150 .supported_bridge = BRIDGE_SN9C101 | BRIDGE_SN9C102, 150 .supported_bridge = BRIDGE_SN9C101 | BRIDGE_SN9C102,
@@ -248,12 +248,10 @@ int sn9c102_probe_hv7131d(struct sn9c102_device* cam)
248 248
249 err = sn9c102_write_const_regs(cam, {0x01, 0x01}, {0x00, 0x01}, 249 err = sn9c102_write_const_regs(cam, {0x01, 0x01}, {0x00, 0x01},
250 {0x28, 0x17}); 250 {0x28, 0x17});
251 if (err)
252 return -EIO;
253 251
254 r0 = sn9c102_i2c_try_read(cam, &hv7131d, 0x00); 252 r0 = sn9c102_i2c_try_read(cam, &hv7131d, 0x00);
255 r1 = sn9c102_i2c_try_read(cam, &hv7131d, 0x01); 253 r1 = sn9c102_i2c_try_read(cam, &hv7131d, 0x01);
256 if (r0 < 0 || r1 < 0) 254 if (err || r0 < 0 || r1 < 0)
257 return -EIO; 255 return -EIO;
258 256
259 if (r0 != 0x00 || r1 != 0x04) 257 if (r0 != 0x00 || r1 != 0x04)