]> git.baikalelectronics.ru Git - kernel.git/commit
PM / Runtime: Fix pm_runtime_suspended()
authorRafael J. Wysocki <rjw@sisk.pl>
Thu, 16 Dec 2010 16:11:58 +0000 (17:11 +0100)
committerRafael J. Wysocki <rjw@sisk.pl>
Thu, 16 Dec 2010 16:12:25 +0000 (17:12 +0100)
commit7a772cad08ff2222cf5a47074cefba9a4701c68a
tree92b3391ed46ceacc8b42a78fb7c6459fb5fa0633
parentee3eef8162e87f3d6a6bc3b627b01f8c7d4183f5
PM / Runtime: Fix pm_runtime_suspended()

There are some situations (e.g. in __pm_generic_call()), where
pm_runtime_suspended() is used to decide whether or not to execute
a device's (system) ->suspend() callback.  The callback is not
executed if pm_runtime_suspended() returns true, but it does so
for devices that don't even support runtime PM, because the
power.disable_depth device field is ignored by it.  This leads to
problems (i.e. devices are not suspened when they should), so rework
pm_runtime_suspended() so that it returns false if the device's
power.disable_depth field is different from zero.

Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
Cc: stable@kernel.org
Documentation/power/runtime_pm.txt
include/linux/pm_runtime.h