diff options
author | Jens Frederich <jfrederich@gmail.com> | 2013-07-25 20:06:32 (GMT) |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2013-07-25 20:38:09 (GMT) |
commit | 5607ce90d727d2aaad93bd72551b97067141d68a (patch) | |
tree | dad1ce9c1c716e0e48346233bfa73c4ed7dbaa8e /drivers/staging/olpc_dcon/olpc_dcon.c | |
parent | f4616af01813cbf6a2c2aabcedb11c721d5e7680 (diff) | |
download | linux-fsl-qoriq-5607ce90d727d2aaad93bd72551b97067141d68a.tar.xz |
Staging: olpc_dcon: change to msleep to usleep_range
The resolution of msleep is related to HZ, so with HZ set to
100 any msleep of less then 10ms will become ~10ms. This is
not what we want. Use usleep_range to get more control of
what is happening here.
Signed-off-by: Jens Frederich <jfrederich@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging/olpc_dcon/olpc_dcon.c')
-rw-r--r-- | drivers/staging/olpc_dcon/olpc_dcon.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/staging/olpc_dcon/olpc_dcon.c b/drivers/staging/olpc_dcon/olpc_dcon.c index 193e1c6..7c460f2 100644 --- a/drivers/staging/olpc_dcon/olpc_dcon.c +++ b/drivers/staging/olpc_dcon/olpc_dcon.c @@ -131,13 +131,13 @@ power_up: pr_warn("unable to force dcon to power up: %d!\n", x); return x; } - msleep(10); /* we'll be conservative */ + usleep_range(10000, 11000); /* we'll be conservative */ } pdata->bus_stabilize_wiggle(); for (x = -1, timeout = 50; timeout && x < 0; timeout--) { - msleep(1); + usleep_range(1000, 1100); x = dcon_read(dcon, DCON_REG_ID); } if (x < 0) { |