mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-09-06 10:57:46 +00:00
PM / Driver core: leave runtime PM enabled during system shutdown
Disabling all runtime PM during system shutdown turns out not to be a
good idea, because some devices may need to be woken up from a
low-power state at that time.
The whole point of disabling runtime PM for system shutdown was to
prevent untimely runtime-suspend method calls. This patch (as1504)
accomplishes the same result by incrementing the usage count for each
device and waiting for ongoing runtime-PM callbacks to finish. This
is what we already do during system suspend and hibernation, which
makes sense since the shutdown method is pretty much a legacy analog
of the pm->poweroff method.
This fixes a recent regression on some OMAP systems introduced by
commit af8db1508f
(PM / driver core:
disable device's runtime PM during shutdown).
Reported-and-tested-by: NeilBrown <neilb@suse.de>
Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
Acked-by: Greg Kroah-Hartman <gregkh@suse.de>
Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
This commit is contained in:
parent
b835c0f47f
commit
fe6b91f470
1 changed files with 4 additions and 2 deletions
|
@ -1743,8 +1743,10 @@ void device_shutdown(void)
|
||||||
*/
|
*/
|
||||||
list_del_init(&dev->kobj.entry);
|
list_del_init(&dev->kobj.entry);
|
||||||
spin_unlock(&devices_kset->list_lock);
|
spin_unlock(&devices_kset->list_lock);
|
||||||
/* Disable all device's runtime power management */
|
|
||||||
pm_runtime_disable(dev);
|
/* Don't allow any more runtime suspends */
|
||||||
|
pm_runtime_get_noresume(dev);
|
||||||
|
pm_runtime_barrier(dev);
|
||||||
|
|
||||||
if (dev->bus && dev->bus->shutdown) {
|
if (dev->bus && dev->bus->shutdown) {
|
||||||
dev_dbg(dev, "shutdown\n");
|
dev_dbg(dev, "shutdown\n");
|
||||||
|
|
Loading…
Reference in a new issue