[PATCHv1 31/38] cx231xx: the reg->size field wasn't filled in.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



From: Hans Verkuil <hans.verkuil@xxxxxxxxx>

Signed-off-by: Hans Verkuil <hans.verkuil@xxxxxxxxx>
Cc: Mauro Carvalho Chehab <mchehab@xxxxxxxxxx>
---
 drivers/media/usb/cx231xx/cx231xx-video.c |    7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/drivers/media/usb/cx231xx/cx231xx-video.c b/drivers/media/usb/cx231xx/cx231xx-video.c
index 54cdd4d..9906261 100644
--- a/drivers/media/usb/cx231xx/cx231xx-video.c
+++ b/drivers/media/usb/cx231xx/cx231xx-video.c
@@ -1272,36 +1272,43 @@ int cx231xx_g_register(struct file *file, void *priv,
 				(u16)reg->reg, value, 4);
 		reg->val = value[0] | value[1] << 8 |
 			value[2] << 16 | value[3] << 24;
+		reg->size = 4;
 		break;
 	case 1:	/* AFE - read byte */
 		ret = cx231xx_read_i2c_data(dev, AFE_DEVICE_ADDRESS,
 				(u16)reg->reg, 2, &data, 1);
 		reg->val = data;
+		reg->size = 1;
 		break;
 	case 2:	/* Video Block - read byte */
 		ret = cx231xx_read_i2c_data(dev, VID_BLK_I2C_ADDRESS,
 				(u16)reg->reg, 2, &data, 1);
 		reg->val = data;
+		reg->size = 1;
 		break;
 	case 3:	/* I2S block - read byte */
 		ret = cx231xx_read_i2c_data(dev, I2S_BLK_DEVICE_ADDRESS,
 				(u16)reg->reg, 1, &data, 1);
 		reg->val = data;
+		reg->size = 1;
 		break;
 	case 4: /* AFE - read dword */
 		ret = cx231xx_read_i2c_data(dev, AFE_DEVICE_ADDRESS,
 				(u16)reg->reg, 2, &data, 4);
 		reg->val = data;
+		reg->size = 4;
 		break;
 	case 5: /* Video Block - read dword */
 		ret = cx231xx_read_i2c_data(dev, VID_BLK_I2C_ADDRESS,
 				(u16)reg->reg, 2, &data, 4);
 		reg->val = data;
+		reg->size = 4;
 		break;
 	case 6: /* I2S Block - read dword */
 		ret = cx231xx_read_i2c_data(dev, I2S_BLK_DEVICE_ADDRESS,
 				(u16)reg->reg, 1, &data, 4);
 		reg->val = data;
+		reg->size = 4;
 		break;
 	default:
 		return -EINVAL;
-- 
1.7.10.4

--
To unsubscribe from this list: send the line "unsubscribe linux-media" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux Input]     [Video for Linux]     [Gstreamer Embedded]     [Mplayer Users]     [Linux USB Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]
  Powered by Linux