From: tskd08@gmail.com
To: linux-media@vger.kernel.org
Cc: mchehab@s-opensource.com, Akihiro Tsukada <tskd08@gmail.com>
Subject: [PATCH v3 4/5] dvb-usb-v2/gl861: use usleep_range() for short delay
Date: Tue, 27 Mar 2018 03:06:51 +0900 [thread overview]
Message-ID: <20180326180652.5385-5-tskd08@gmail.com> (raw)
In-Reply-To: <20180326180652.5385-1-tskd08@gmail.com>
From: Akihiro Tsukada <tskd08@gmail.com>
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>
---
drivers/media/usb/dvb-usb-v2/gl861.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/media/usb/dvb-usb-v2/gl861.c b/drivers/media/usb/dvb-usb-v2/gl861.c
index bc18ca33649..a57afb12e84 100644
--- a/drivers/media/usb/dvb-usb-v2/gl861.c
+++ b/drivers/media/usb/dvb-usb-v2/gl861.c
@@ -45,7 +45,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);
--
2.16.2
next prev parent reply other threads:[~2018-03-26 18:08 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-03-26 18:06 [PATCH v3 0/5] dvb-usb-friio: decompose friio and merge with gl861 tskd08
2018-03-26 18:06 ` [PATCH v3 1/5] dvb-frontends/dvb-pll: add i2c driver support tskd08
2018-03-27 23:55 ` Antti Palosaari
2018-03-26 18:06 ` [PATCH v3 2/5] dvb-frontends/dvb-pll: add tua6034 ISDB-T tuner used in Friio tskd08
2018-03-26 18:06 ` [PATCH v3 3/5] dvb-usb/friio, dvb-usb-v2/gl861: decompose friio tskd08
2018-03-27 15:18 ` kbuild test robot
2018-03-27 15:18 ` [RFC PATCH] dvb-usb/friio, dvb-usb-v2/gl861: friio_props can be static kbuild test robot
2018-03-26 18:06 ` tskd08 [this message]
2018-03-26 18:06 ` [PATCH v3 5/5] dvb-usb-v2/gl861: ensure USB message buffers DMA'able tskd08
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20180326180652.5385-5-tskd08@gmail.com \
--to=tskd08@gmail.com \
--cc=linux-media@vger.kernel.org \
--cc=mchehab@s-opensource.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.