summaryrefslogtreecommitdiff
path: root/drivers/media/usb
diff options
context:
space:
mode:
authorMatthias Schwarzott <zzam@gentoo.org>2014-11-01 17:19:21 -0300
committerMauro Carvalho Chehab <mchehab@osg.samsung.com>2014-11-03 15:57:08 -0200
commit0d88d0916b988d37edac35407688bc4b009c916b (patch)
tree606bc92970d1523b92850212727481de42583caa /drivers/media/usb
parent6ac825cb3e64c4831d9efa93d3497b104c42c84e (diff)
[media] cx231xx: use 1 byte read for i2c scan
Now cx231xx_i2c_check_for_device works like i2c_check_for_device of em28xx driver. For me this fixes scanning of all ports but port 2. Signed-off-by: Matthias Schwarzott <zzam@gentoo.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
Diffstat (limited to 'drivers/media/usb')
-rw-r--r--drivers/media/usb/cx231xx/cx231xx-i2c.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/drivers/media/usb/cx231xx/cx231xx-i2c.c b/drivers/media/usb/cx231xx/cx231xx-i2c.c
index 1a0d9efeb209..5a0604711be0 100644
--- a/drivers/media/usb/cx231xx/cx231xx-i2c.c
+++ b/drivers/media/usb/cx231xx/cx231xx-i2c.c
@@ -350,14 +350,15 @@ static int cx231xx_i2c_check_for_device(struct i2c_adapter *i2c_adap,
struct cx231xx *dev = bus->dev;
struct cx231xx_i2c_xfer_data req_data;
int status = 0;
+ u8 buf[1];
/* prepare xfer_data struct */
req_data.dev_addr = msg->addr;
- req_data.direction = msg->flags;
+ req_data.direction = I2C_M_RD;
req_data.saddr_len = 0;
req_data.saddr_dat = 0;
- req_data.buf_size = 0;
- req_data.p_buffer = NULL;
+ req_data.buf_size = 1;
+ req_data.p_buffer = buf;
/* usb send command */
status = dev->cx231xx_send_usb_command(bus, &req_data);