[media] media/i2c: fill in missing reg->size fields
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Acked-by: Lad, Prabhakar <prabhakar.csengg@gmail.com> Cc: Guennadi Liakhovetski <g.liakhovetski@gmx.de> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
This commit is contained in:
parent
43aea90116
commit
15c4fee344
|
@ -69,6 +69,7 @@ static int ak881x_g_register(struct v4l2_subdev *sd,
|
||||||
if (reg->reg > 0x26)
|
if (reg->reg > 0x26)
|
||||||
return -EINVAL;
|
return -EINVAL;
|
||||||
|
|
||||||
|
reg->size = 1;
|
||||||
reg->val = reg_read(client, reg->reg);
|
reg->val = reg_read(client, reg->reg);
|
||||||
|
|
||||||
if (reg->val > 0xffff)
|
if (reg->val > 0xffff)
|
||||||
|
|
|
@ -398,6 +398,7 @@ static int mt9t031_g_register(struct v4l2_subdev *sd,
|
||||||
if (reg->reg > 0xff)
|
if (reg->reg > 0xff)
|
||||||
return -EINVAL;
|
return -EINVAL;
|
||||||
|
|
||||||
|
reg->size = 1;
|
||||||
reg->val = reg_read(client, reg->reg);
|
reg->val = reg_read(client, reg->reg);
|
||||||
|
|
||||||
if (reg->val > 0xffff)
|
if (reg->val > 0xffff)
|
||||||
|
|
|
@ -527,6 +527,7 @@ static int tw9910_g_register(struct v4l2_subdev *sd,
|
||||||
if (reg->reg > 0xff)
|
if (reg->reg > 0xff)
|
||||||
return -EINVAL;
|
return -EINVAL;
|
||||||
|
|
||||||
|
reg->size = 1;
|
||||||
ret = i2c_smbus_read_byte_data(client, reg->reg);
|
ret = i2c_smbus_read_byte_data(client, reg->reg);
|
||||||
if (ret < 0)
|
if (ret < 0)
|
||||||
return ret;
|
return ret;
|
||||||
|
|
|
@ -722,6 +722,7 @@ static int tvp7002_g_register(struct v4l2_subdev *sd,
|
||||||
|
|
||||||
ret = tvp7002_read(sd, reg->reg & 0xff, &val);
|
ret = tvp7002_read(sd, reg->reg & 0xff, &val);
|
||||||
reg->val = val;
|
reg->val = val;
|
||||||
|
reg->size = 1;
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue