From: Krzysztof Kozlowski Date: Sun, 3 Apr 2016 03:23:07 +0000 (+0900) Subject: PM / runtime: Document steps for device removal X-Git-Tag: v4.14-rc1~3144^2^4~5 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=8fd2910e31155d8562180cc8580bc27e3be4f4bf;p=platform%2Fkernel%2Flinux-rpi.git PM / runtime: Document steps for device removal Put a reminder that during device removal drivers should revert all PM runtime changes from the probe. Signed-off-by: Krzysztof Kozlowski Acked-by: Alan Stern Signed-off-by: Rafael J. Wysocki --- diff --git a/Documentation/power/runtime_pm.txt b/Documentation/power/runtime_pm.txt index 7328cf8..1fd1fbe 100644 --- a/Documentation/power/runtime_pm.txt +++ b/Documentation/power/runtime_pm.txt @@ -586,6 +586,10 @@ drivers to make their ->remove() callbacks avoid races with runtime PM directly, but also it allows of more flexibility in the handling of devices during the removal of their drivers. +Drivers in ->remove() callback should undo the runtime PM changes done +in ->probe(). Usually this means calling pm_runtime_disable(), +pm_runtime_dont_use_autosuspend() etc. + The user space can effectively disallow the driver of the device to power manage it at run time by changing the value of its /sys/devices/.../power/control attribute to "on", which causes pm_runtime_forbid() to be called. In principle,