aboutsummaryrefslogtreecommitdiff
path: root/Documentation
diff options
context:
space:
mode:
authorRafael J. Wysocki <rjw@sisk.pl>2010-12-16 10:16:50 +0530
committerSrinidhi KASAGAR <srinidhi.kasagar@stericsson.com>2011-01-18 13:14:04 +0100
commit3f0055b3ba56385286b8d2cdaa17f717217b1685 (patch)
tree3d1285f58ceebf282603bcecfa760185ef9c5fc9 /Documentation
parentee1b909f8be8901b60da0ccf34a8e3857b30c6ce (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> ST-Ericsson Linux next: - ST-Ericsson ID: AP317082 ST-Ericsson FOSS-OUT ID: - Change-Id: I63631379679b891230a9d3f473d14534e02eea47 Reviewed-on: http://gerrit.lud.stericsson.com/gerrit/12724 Tested-by: Rabin VINCENT <rabin.vincent@stericsson.com> Reviewed-by: Srinidhi KASAGAR <srinidhi.kasagar@stericsson.com>
Diffstat (limited to 'Documentation')
-rw-r--r--Documentation/power/runtime_pm.txt4
1 files changed, 2 insertions, 2 deletions
diff --git a/Documentation/power/runtime_pm.txt b/Documentation/power/runtime_pm.txt
index 2292d744509..ffe55ffa540 100644
--- a/Documentation/power/runtime_pm.txt
+++ b/Documentation/power/runtime_pm.txt
@@ -396,8 +396,8 @@ drivers/base/power/runtime.c and include/linux/pm_runtime.h:
zero)
bool pm_runtime_suspended(struct device *dev);
- - return true if the device's runtime PM status is 'suspended', or false
- otherwise
+ - return true if the device's runtime PM status is 'suspended' and its
+ 'power.disable_depth' field is equal to zero, or false otherwise
void pm_runtime_allow(struct device *dev);
- set the power.runtime_auto flag for the device and decrease its usage