Skip to content
Commit baab52de authored by Rafael J. Wysocki's avatar Rafael J. Wysocki
Browse files

PM / runtime: Use pm_runtime_put_sync() in __device_release_driver()



Commit fa180eb4 (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 fa180eb4 and restore the previous behavior of
__device_release_driver().

Reported-by: default avatarTomi Valkeinen <tomi.valkeinen@ti.com>
Fixes: fa180eb4 (PM / Runtime: Idle devices asynchronously after probe|release)
Signed-off-by: default avatarRafael J. Wysocki <rafael.j.wysocki@intel.com>
Acked-by: default avatarKevin Hilman <khilman@linaro.org>
Acked-by: default avatarUlf Hansson <ulf.hansson@linaro.org>
Cc: 3.10+ <stable@vger.kernel.org> # 3.10+
parent d66e6db2
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment