Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit d4f748ee authored by Hemant Kumar's avatar Hemant Kumar Committed by Pratham Pratap
Browse files

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: default avatarHemant Kumar <hemantk@codeaurora.org>
Signed-off-by: default avatarPratham Pratap <prathampratap@codeaurora.org>
parent 4afb6696
Loading
Loading
Loading
Loading
+3 −2
Original line number Diff line number Diff line
@@ -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: