Commit 5607ce90 authored by Jens Frederich's avatar Jens Frederich Committed by Greg Kroah-Hartman

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: default avatarJens Frederich <jfrederich@gmail.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent f4616af0
...@@ -131,13 +131,13 @@ static int dcon_bus_stabilize(struct dcon_priv *dcon, int is_powered_down) ...@@ -131,13 +131,13 @@ static int dcon_bus_stabilize(struct dcon_priv *dcon, int is_powered_down)
pr_warn("unable to force dcon to power up: %d!\n", x); pr_warn("unable to force dcon to power up: %d!\n", x);
return x; return x;
} }
msleep(10); /* we'll be conservative */ usleep_range(10000, 11000); /* we'll be conservative */
} }
pdata->bus_stabilize_wiggle(); pdata->bus_stabilize_wiggle();
for (x = -1, timeout = 50; timeout && x < 0; timeout--) { for (x = -1, timeout = 50; timeout && x < 0; timeout--) {
msleep(1); usleep_range(1000, 1100);
x = dcon_read(dcon, DCON_REG_ID); x = dcon_read(dcon, DCON_REG_ID);
} }
if (x < 0) { if (x < 0) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment