diff options
author | Rafael J. Wysocki <rjw@sisk.pl> | 2010-12-16 11:11:58 -0500 |
---|---|---|
committer | Rafael J. Wysocki <rjw@sisk.pl> | 2010-12-16 11:12:25 -0500 |
commit | f08f5a0add20834d3f3d876dfe08005a5df656db (patch) | |
tree | 92b3391ed46ceacc8b42a78fb7c6459fb5fa0633 /Documentation/power | |
parent | be8cd644c49dca4212e975455c8e7119b848ebe8 (diff) |
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
Diffstat (limited to 'Documentation/power')
-rw-r--r-- | Documentation/power/runtime_pm.txt | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Documentation/power/runtime_pm.txt b/Documentation/power/runtime_pm.txt index 489e9bacd16..41cc7b30d7d 100644 --- a/Documentation/power/runtime_pm.txt +++ b/Documentation/power/runtime_pm.txt | |||
@@ -379,8 +379,8 @@ drivers/base/power/runtime.c and include/linux/pm_runtime.h: | |||
379 | zero) | 379 | zero) |
380 | 380 | ||
381 | bool pm_runtime_suspended(struct device *dev); | 381 | bool pm_runtime_suspended(struct device *dev); |
382 | - return true if the device's runtime PM status is 'suspended', or false | 382 | - return true if the device's runtime PM status is 'suspended' and its |
383 | otherwise | 383 | 'power.disable_depth' field is equal to zero, or false otherwise |
384 | 384 | ||
385 | void pm_runtime_allow(struct device *dev); | 385 | void pm_runtime_allow(struct device *dev); |
386 | - set the power.runtime_auto flag for the device and decrease its usage | 386 | - set the power.runtime_auto flag for the device and decrease its usage |