aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorRafael J. Wysocki <rjw@sisk.pl>2010-12-24 09:04:06 -0500
committerRafael J. Wysocki <rjw@sisk.pl>2010-12-24 09:04:06 -0500
commit4b31db8a16fa0d4d6a0fa42d044e7a4f4dad3641 (patch)
tree4075d84f26fdd8e70ec62c9b541caa1ea23cebda /drivers
parent5c1a07ab3e78ef68fc9ccf419c969e8ed88d7cb6 (diff)
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>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/base/power/generic_ops.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/base/power/generic_ops.c b/drivers/base/power/generic_ops.c
index 3d2c3500069a..42f97f925629 100644
--- a/drivers/base/power/generic_ops.c
+++ b/drivers/base/power/generic_ops.c
@@ -185,7 +185,7 @@ static int __pm_generic_resume(struct device *dev, int event)
185 return 0; 185 return 0;
186 186
187 ret = callback(dev); 187 ret = callback(dev);
188 if (!ret) { 188 if (!ret && pm_runtime_enabled(dev)) {
189 pm_runtime_disable(dev); 189 pm_runtime_disable(dev);
190 pm_runtime_set_active(dev); 190 pm_runtime_set_active(dev);
191 pm_runtime_enable(dev); 191 pm_runtime_enable(dev);