[lkml]   [2013]   [Dec]   [2]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
Patch in this message
Subject[PATCH 3.12 097/212] PM / runtime: Use pm_runtime_put_sync() in __device_release_driver()
3.12-stable review patch.  If anyone has any objections, please let me know.


From: "Rafael J. Wysocki" <>

commit baab52ded242c35a2290e1fa82e0cc147d0d8c1a upstream.

Commit fa180eb448fa (PM / Runtime: Idle devices asynchronously after
probe|release) modified __device_release_driver() to call
pm_runtime_put(dev) instead of pm_runtime_put_sync(dev) before
detaching the driver from the device. However, that was a mistake,
because pm_runtime_put(dev) causes rpm_idle() to be queued up and
the driver may be gone already when that function is executed.
That breaks the assumptions the drivers have the right to make
about the core's behavior on the basis of the existing documentation
and actually causes problems to happen, so revert that part of
commit fa180eb448fa and restore the previous behavior of

Reported-by: Tomi Valkeinen <>
Fixes: fa180eb448fa (PM / Runtime: Idle devices asynchronously after probe|release)
Signed-off-by: Rafael J. Wysocki <>
Acked-by: Kevin Hilman <>
Acked-by: Ulf Hansson <>
Signed-off-by: Greg Kroah-Hartman <>

drivers/base/dd.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

--- a/drivers/base/dd.c
+++ b/drivers/base/dd.c
@@ -499,7 +499,7 @@ static void __device_release_driver(stru

- pm_runtime_put(dev);
+ pm_runtime_put_sync(dev);

if (dev->bus && dev->bus->remove)

 \ /
  Last update: 2013-12-02 21:41    [W:0.373 / U:2.704 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site