]> git.baikalelectronics.ru Git - kernel.git/commit
PM / Driver core: leave runtime PM enabled during system shutdown
authorAlan Stern <stern@rowland.harvard.edu>
Tue, 6 Dec 2011 22:24:52 +0000 (23:24 +0100)
committerRafael J. Wysocki <rjw@sisk.pl>
Wed, 7 Dec 2011 21:26:56 +0000 (22:26 +0100)
commitef387d3fb72410905a942559657d3b67358f1dfe
tree0c63640274b02fdb3c95546cf966896e97bb5877
parent61e51d84a0892023a4b93687532bc55e8efc75e7
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 5dd3b6748d680d0613a709343340064aac3fff38 (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>
drivers/base/core.c