summaryrefslogtreecommitdiff
path: root/linux/drivers/media/video/em28xx/em28xx-core.c
diff options
context:
space:
mode:
authorMauro Carvalho Chehab <mchehab@infradead.org>2008-04-17 18:42:14 -0300
committerMauro Carvalho Chehab <mchehab@infradead.org>2008-04-17 18:42:14 -0300
commit1ba2e262c1859c889ff2c472357b092da3e77298 (patch)
treeb6f4590a5f0538e6d12a7317115d33038ccac104 /linux/drivers/media/video/em28xx/em28xx-core.c
parentae3fc98c477de56e87e3720f441b274ae6e0927a (diff)
downloadmediapointer-dvb-s2-1ba2e262c1859c889ff2c472357b092da3e77298.tar.gz
mediapointer-dvb-s2-1ba2e262c1859c889ff2c472357b092da3e77298.tar.bz2
em28xx: Select reg wait time based on chip ID
From: Mauro Carvalho Chehab <mchehab@infradead.org> This is more conservative than just removing the msleep() from em28xx_write_regs_req(), since some old hardware may still need it. So, it will remove the sleep time only for those chips where this removal were tested. Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
Diffstat (limited to 'linux/drivers/media/video/em28xx/em28xx-core.c')
-rw-r--r--linux/drivers/media/video/em28xx/em28xx-core.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/linux/drivers/media/video/em28xx/em28xx-core.c b/linux/drivers/media/video/em28xx/em28xx-core.c
index baf3ad22f..ea86974e3 100644
--- a/linux/drivers/media/video/em28xx/em28xx-core.c
+++ b/linux/drivers/media/video/em28xx/em28xx-core.c
@@ -153,6 +153,9 @@ int em28xx_write_regs_req(struct em28xx *dev, u8 req, u16 reg, char *buf,
ret = usb_control_msg(dev->udev, usb_sndctrlpipe(dev->udev, 0), req,
USB_DIR_OUT | USB_TYPE_VENDOR | USB_RECIP_DEVICE,
0x0000, reg, bufs, len, HZ);
+ if (dev->wait_after_write)
+ msleep(dev->wait_after_write);
+
kfree(bufs);
return ret;
}