Commit f82fadcf authored by Hans Verkuil's avatar Hans Verkuil Committed by Mauro Carvalho Chehab

[media] sn9c20x: the reg->size field wasn't filled in

Signed-off-by: default avatarHans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@redhat.com>
parent 04ae4cf2
......@@ -1557,6 +1557,7 @@ static int sd_dbg_g_register(struct gspca_dev *gspca_dev,
{
struct sd *sd = (struct sd *) gspca_dev;
reg->size = 1;
switch (reg->match.addr) {
case 0:
if (reg->reg < 0x1000 || reg->reg > 0x11ff)
......@@ -1568,6 +1569,7 @@ static int sd_dbg_g_register(struct gspca_dev *gspca_dev,
if (sd->sensor >= SENSOR_MT9V011 &&
sd->sensor <= SENSOR_MT9M112) {
i2c_r2(gspca_dev, reg->reg, (u16 *) &reg->val);
reg->size = 2;
} else {
i2c_r1(gspca_dev, reg->reg, (u8 *) &reg->val);
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment