summaryrefslogtreecommitdiff
path: root/drivers/media/usb/gspca
diff options
context:
space:
mode:
authorHans Verkuil <hans.verkuil@cisco.com>2013-05-29 10:00:05 (GMT)
committerMauro Carvalho Chehab <mchehab@redhat.com>2013-06-17 11:55:34 (GMT)
commitf82fadcfecb5d4aff0711d63fd321f7fabb0f2fa (patch)
tree54488f8d5d9f3982dedd7a2cce19402a5e6c6fa7 /drivers/media/usb/gspca
parent04ae4cf2cb0c5963b0ea6554f573705c37172313 (diff)
downloadlinux-fsl-qoriq-f82fadcfecb5d4aff0711d63fd321f7fabb0f2fa.tar.xz
[media] sn9c20x: the reg->size field wasn't filled in
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/media/usb/gspca')
-rw-r--r--drivers/media/usb/gspca/sn9c20x.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/media/usb/gspca/sn9c20x.c b/drivers/media/usb/gspca/sn9c20x.c
index 23b71f9..f4453d5 100644
--- a/drivers/media/usb/gspca/sn9c20x.c
+++ b/drivers/media/usb/gspca/sn9c20x.c
@@ -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);
}