summaryrefslogtreecommitdiffstats
path: root/drivers/media/dvb
diff options
context:
space:
mode:
authorHans-Frieder Vogt <hfvogt@gmx.net>2012-04-01 14:11:29 -0300
committerMauro Carvalho Chehab <mchehab@redhat.com>2012-04-09 14:45:16 -0300
commit812fe6d9426a23ad78055f1fa955acef9bea9a93 (patch)
tree31d9ee0f04c1393a322c9fa936fb92532803318b /drivers/media/dvb
parent8e8a5ac763d057fae50f2f7cc4fc830c5f815d26 (diff)
downloadtalos-op-linux-812fe6d9426a23ad78055f1fa955acef9bea9a93.tar.gz
talos-op-linux-812fe6d9426a23ad78055f1fa955acef9bea9a93.zip
[media] af9035: i2c read fix
Enable i2c read requests. I2C read fix (necessary e.g. for mxl5007t tuner, because it sends a 2 bytes for a read request, thus msg[0].len != msg[1].len). Signed-off-by: Hans-Frieder Vogt <hfvogt@gmx.net> Signed-off-by: Antti Palosaari <crope@iki.fi> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/media/dvb')
-rw-r--r--drivers/media/dvb/dvb-usb/af9035.c11
1 files changed, 1 insertions, 10 deletions
diff --git a/drivers/media/dvb/dvb-usb/af9035.c b/drivers/media/dvb/dvb-usb/af9035.c
index dc0a49ac664a..6a83120afcd6 100644
--- a/drivers/media/dvb/dvb-usb/af9035.c
+++ b/drivers/media/dvb/dvb-usb/af9035.c
@@ -209,24 +209,15 @@ static int af9035_i2c_master_xfer(struct i2c_adapter *adap,
msg[1].len);
} else {
/* I2C */
-#if 0
- /*
- * FIXME: Keep that code. It should work but as it is
- * not tested I left it disabled and return -EOPNOTSUPP
- * for the sure.
- */
u8 buf[4 + msg[0].len];
struct usb_req req = { CMD_I2C_RD, 0, sizeof(buf),
buf, msg[1].len, msg[1].buf };
- buf[0] = msg[0].len;
+ buf[0] = msg[1].len;
buf[1] = msg[0].addr << 1;
buf[2] = 0x01;
buf[3] = 0x00;
memcpy(&buf[4], msg[0].buf, msg[0].len);
ret = af9035_ctrl_msg(d->udev, &req);
-#endif
- pr_debug("%s: I2C operation not supported\n", __func__);
- ret = -EOPNOTSUPP;
}
} else if (num == 1 && !(msg[0].flags & I2C_M_RD)) {
if (msg[0].len > 40) {
OpenPOWER on IntegriCloud