[PATCH] driver core: Add missing pm_runtime_put_noidle

Yongzhi Liu posted 1 patch 4 years, 5 months ago
drivers/base/core.c | 2 ++
1 file changed, 2 insertions(+)
[PATCH] driver core: Add missing pm_runtime_put_noidle
Posted by Yongzhi Liu 4 years, 5 months ago
pm_runtime_get_noresume() in device_shutdown increments the
runtime PM usage counter, thus a matching decrement is needed
to keep the counter balanced.

Signed-off-by: Yongzhi Liu <lyz_cs@pku.edu.cn>
---
 drivers/base/core.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/base/core.c b/drivers/base/core.c
index 7bb957b..d41be8a 100644
--- a/drivers/base/core.c
+++ b/drivers/base/core.c
@@ -4533,6 +4533,8 @@ void device_shutdown(void)
 			dev->driver->shutdown(dev);
 		}
 
+		pm_runtime_put_noidle(dev);
+
 		device_unlock(dev);
 		if (parent)
 			device_unlock(parent);
-- 
2.7.4