usb: core: Resume the devices on pm restore

On system restoring from hibernation to reset-resume
the connected USB devices, resume the devices
on pm restore irrespective of the skip_resume
flag.

Change-Id: I56e46c579db572e39eabdc6d2be95b00f2c7d9cb
Signed-off-by: Sriharsha Allenki <sallenki@codeaurora.org>
Signed-off-by: Ajay Agarwal <ajaya@codeaurora.org>
This commit is contained in:
Sriharsha Allenki 2018-05-17 11:25:06 +05:30 committed by Ajay Agarwal
parent dd4a9bfbf0
commit 6c16439a24

View file

@ -1495,9 +1495,10 @@ int usb_resume(struct device *dev, pm_message_t msg)
* Some buses would like to keep their devices in suspend * Some buses would like to keep their devices in suspend
* state after system resume. Their resume happen when * state after system resume. Their resume happen when
* a remote wakeup is detected or interface driver start * a remote wakeup is detected or interface driver start
* I/O. * I/O. And in the case when the system is restoring from
* hibernation, make sure all the devices are resumed.
*/ */
if (udev->bus->skip_resume) if (udev->bus->skip_resume && msg.event != PM_EVENT_RESTORE)
return 0; return 0;
/* For all calls, take the device back to full power and /* For all calls, take the device back to full power and