mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-14 16:46:15 -04:00
usb: core: Replace msleep with usleep_range
Since usleep_range provides better accuracy in comparison to msleep. This helps in reducing the latency of host bus resume. Change-Id: Ie8d5231327fcc27ab2a28542e0d96687abb9aace Signed-off-by: Hemant Kumar <hemantk@codeaurora.org> Signed-off-by: Pratham Pratap <prathampratap@codeaurora.org>
This commit is contained in:
parent
4afb66961f
commit
d4f748eefb
1 changed files with 3 additions and 2 deletions
|
|
@ -3568,7 +3568,8 @@ int usb_port_resume(struct usb_device *udev, pm_message_t msg)
|
|||
/* drive resume for USB_RESUME_TIMEOUT msec */
|
||||
dev_dbg(&udev->dev, "usb %sresume\n",
|
||||
(PMSG_IS_AUTO(msg) ? "auto-" : ""));
|
||||
msleep(USB_RESUME_TIMEOUT);
|
||||
usleep_range(USB_RESUME_TIMEOUT * 1000,
|
||||
(USB_RESUME_TIMEOUT + 1) * 1000);
|
||||
|
||||
/* Virtual root hubs can trigger on GET_PORT_STATUS to
|
||||
* stop resume signaling. Then finish the resume
|
||||
|
|
@ -3577,7 +3578,7 @@ int usb_port_resume(struct usb_device *udev, pm_message_t msg)
|
|||
status = hub_port_status(hub, port1, &portstatus, &portchange);
|
||||
|
||||
/* TRSMRCY = 10 msec */
|
||||
msleep(10);
|
||||
usleep_range(10000, 10500);
|
||||
}
|
||||
|
||||
SuspendCleared:
|
||||
|
|
|
|||
Loading…
Reference in a new issue