]> git.baikalelectronics.ru Git - kernel.git/commit
PM / runtime: Use pm_runtime_put_sync() in __device_release_driver()
authorRafael J. Wysocki <rafael.j.wysocki@intel.com>
Thu, 7 Nov 2013 00:51:15 +0000 (01:51 +0100)
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>
Thu, 7 Nov 2013 18:13:49 +0000 (19:13 +0100)
commit0ddfef91e76c623043b2b434ba6b2f5036520113
tree45264cbeae6fb364ff54d1fd7903040aef2e294e
parent34e768228364c60c757be00f6a004d421ddd0438
PM / runtime: Use pm_runtime_put_sync() in __device_release_driver()

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

Reported-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
Fixes: 06d6d3303554 (PM / Runtime: Idle devices asynchronously after probe|release)
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Acked-by: Kevin Hilman <khilman@linaro.org>
Acked-by: Ulf Hansson <ulf.hansson@linaro.org>
Cc: 3.10+ <stable@vger.kernel.org> # 3.10+
drivers/base/dd.c