PM / Runtime: Generic resume shouldn't set RPM_ACTIVE unconditionally
The __pm_generic_resume() function changes the given device's runtime PM status to RPM_ACTIVE if its driver's callback returns 0, but it only should do that if the rumtime PM is enabled for the device. Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
This commit is contained in:
@@ -185,7 +185,7 @@ static int __pm_generic_resume(struct device *dev, int event)
|
||||
return 0;
|
||||
|
||||
ret = callback(dev);
|
||||
if (!ret) {
|
||||
if (!ret && pm_runtime_enabled(dev)) {
|
||||
pm_runtime_disable(dev);
|
||||
pm_runtime_set_active(dev);
|
||||
pm_runtime_enable(dev);
|
||||
|
||||
Reference in New Issue
Block a user