summaryrefslogtreecommitdiff
path: root/drivers/media/dvb/dvb-usb/af9015.c
diff options
context:
space:
mode:
authorAntti Palosaari <crope@iki.fi>2009-01-20 20:56:20 +0300
committerMauro Carvalho Chehab <mchehab@redhat.com>2009-01-29 13:56:43 +0300
commitd1a470fbd987b28e64287718917faf8caf67a055 (patch)
tree2f801f8f4bba4f3267b91bf578a26c860974879a /drivers/media/dvb/dvb-usb/af9015.c
parentf0830ebec9993e76b6280e3abb93ceab57b2c923 (diff)
downloadlinux-d1a470fbd987b28e64287718917faf8caf67a055.tar.xz
V4L/DVB (10288): af9015: bug fix: stick does not work always when plugged
First control messages to the stick timeouts very often due to probable hw bug. Repeat first message few times if it fails as workaround. Signed-off-by: Antti Palosaari <crope@iki.fi> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/media/dvb/dvb-usb/af9015.c')
-rw-r--r--drivers/media/dvb/dvb-usb/af9015.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/drivers/media/dvb/dvb-usb/af9015.c b/drivers/media/dvb/dvb-usb/af9015.c
index dbeaf79defd8..6a97a40d3dfb 100644
--- a/drivers/media/dvb/dvb-usb/af9015.c
+++ b/drivers/media/dvb/dvb-usb/af9015.c
@@ -694,7 +694,12 @@ static int af9015_read_config(struct usb_device *udev)
/* IR remote controller */
req.addr = AF9015_EEPROM_IR_MODE;
- ret = af9015_rw_udev(udev, &req);
+ /* first message will timeout often due to possible hw bug */
+ for (i = 0; i < 4; i++) {
+ ret = af9015_rw_udev(udev, &req);
+ if (!ret)
+ break;
+ }
if (ret)
goto error;
deb_info("%s: IR mode:%d\n", __func__, val);