pm: don't suspend unready devices when entering low power states
The PM subsystem should not call the PM control callbacks on uninitialized devices when entering low-power states. Signed-off-by: Corey Wharton <xodus7@cwharton.com>
This commit is contained in:
parent
108d516397
commit
21a7c2d7eb
3 changed files with 34 additions and 5 deletions
|
@ -69,12 +69,13 @@ static int pm_suspend_devices(void)
|
|||
int ret;
|
||||
|
||||
/*
|
||||
* ignore busy devices, wake up source and devices with
|
||||
* runtime PM enabled.
|
||||
* Ignore uninitialized devices, busy devices, wake up sources, and
|
||||
* devices with runtime PM enabled.
|
||||
*/
|
||||
if (pm_device_is_busy(dev) || pm_device_state_is_locked(dev)
|
||||
|| pm_device_wakeup_is_enabled(dev) ||
|
||||
((dev->pm != NULL) && pm_device_runtime_is_enabled(dev))) {
|
||||
if (!device_is_ready(dev) || pm_device_is_busy(dev) ||
|
||||
pm_device_state_is_locked(dev) ||
|
||||
pm_device_wakeup_is_enabled(dev) ||
|
||||
pm_device_runtime_is_enabled(dev)) {
|
||||
continue;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue