summaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorAkihiro Tsukada <tskd08@gmail.com>2018-04-08 13:21:37 -0400
committerMauro Carvalho Chehab <mchehab+samsung@kernel.org>2018-05-05 07:15:09 -0400
commit87360e68b33f12c9e5b08636a3e349f851eba706 (patch)
treef233e924d5e39c5d5c91606b4ca4351c4230baaf /drivers
parent17459727ba52f2566c19b9621b9205a0910ec161 (diff)
downloadlinux-87360e68b33f12c9e5b08636a3e349f851eba706.tar.bz2
media: dvb-usb-v2/gl861: use usleep_range() for short delay
As the kernel doc "timers-howto.txt" reads, short delay with msleep() can take much longer. In a case of raspbery-pi platform where CONFIG_HZ_100 was set, it actually affected the init of Friio devices since it issues lots of i2c transactions with short delay. Signed-off-by: Akihiro Tsukada <tskd08@gmail.com> Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/media/usb/dvb-usb-v2/gl861.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/media/usb/dvb-usb-v2/gl861.c b/drivers/media/usb/dvb-usb-v2/gl861.c
index b1b09c547861..b1dbb9af380b 100644
--- a/drivers/media/usb/dvb-usb-v2/gl861.c
+++ b/drivers/media/usb/dvb-usb-v2/gl861.c
@@ -43,7 +43,7 @@ static int gl861_i2c_msg(struct dvb_usb_device *d, u8 addr,
return -EINVAL;
}
- msleep(1); /* avoid I2C errors */
+ usleep_range(1000, 2000); /* avoid I2C errors */
return usb_control_msg(d->udev, usb_rcvctrlpipe(d->udev, 0), req, type,
value, index, rbuf, rlen, 2000);