Skip to content

Commit

Permalink
spi: core: Replace msleep with usleep_range to get more accurate slee…
Browse files Browse the repository at this point in the history
…p time

Fixes below checkpatch warning:
WARNING: msleep < 20ms can sleep for up to 20ms; see Documentation/timers/timers-howto.txt
+               msleep(10);

Signed-off-by: Axel Lin <axel.lin@ingics.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
  • Loading branch information
Axel Lin authored and Mark Brown committed Feb 23, 2014
1 parent 4d94bd2 commit f97b26b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/spi/spi.c
Original file line number Diff line number Diff line change
Expand Up @@ -892,7 +892,7 @@ static int spi_stop_queue(struct spi_master *master)
*/
while ((!list_empty(&master->queue) || master->busy) && limit--) {
spin_unlock_irqrestore(&master->queue_lock, flags);
msleep(10);
usleep_range(10000, 11000);
spin_lock_irqsave(&master->queue_lock, flags);
}

Expand Down

0 comments on commit f97b26b

Please sign in to comment.