aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/usb/storage/transport.c
diff options
context:
space:
mode:
authorSunny Kumar <sunny.kumar.roy@gmail.com>2015-07-07 02:57:03 -0400
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2015-07-22 18:45:04 -0400
commite616b39a16d4458224d91697b0a2599336f0c38c (patch)
tree38236d5789675d04049820105a5ab0c53064dce4 /drivers/usb/storage/transport.c
parent655fe4effe0f1f40e4f6ca6b3cc64a7fe0032183 (diff)
usb: usleep_range is preferred over udelay where wakeup is flexible
According to Documentation/timers/timers-howto.txt" udelay() is only called once from a place where sleeping is allowed. We can replace it with a call to usleep_range() with a reasonable upper limit. Signed-off-by: Sunny Kumar <sunny.kumar.roy@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/usb/storage/transport.c')
-rw-r--r--drivers/usb/storage/transport.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/usb/storage/transport.c b/drivers/usb/storage/transport.c
index 540add24a12f..5e67f63b2e46 100644
--- a/drivers/usb/storage/transport.c
+++ b/drivers/usb/storage/transport.c
@@ -1111,7 +1111,7 @@ int usb_stor_Bulk_transport(struct scsi_cmnd *srb, struct us_data *us)
1111 * command phase and the data phase. Some devices need a little 1111 * command phase and the data phase. Some devices need a little
1112 * more than that, probably because of clock rate inaccuracies. */ 1112 * more than that, probably because of clock rate inaccuracies. */
1113 if (unlikely(us->fflags & US_FL_GO_SLOW)) 1113 if (unlikely(us->fflags & US_FL_GO_SLOW))
1114 udelay(125); 1114 usleep_range(125, 150);
1115 1115
1116 if (transfer_length) { 1116 if (transfer_length) {
1117 unsigned int pipe = srb->sc_data_direction == DMA_FROM_DEVICE ? 1117 unsigned int pipe = srb->sc_data_direction == DMA_FROM_DEVICE ?