aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/base/power/runtime.c11
1 files changed, 2 insertions, 9 deletions
diff --git a/drivers/base/power/runtime.c b/drivers/base/power/runtime.c
index e957c496a1b1..1dd8676d7f55 100644
--- a/drivers/base/power/runtime.c
+++ b/drivers/base/power/runtime.c
@@ -281,7 +281,6 @@ static int rpm_suspend(struct device *dev, int rpmflags)
281{ 281{
282 int (*callback)(struct device *); 282 int (*callback)(struct device *);
283 struct device *parent = NULL; 283 struct device *parent = NULL;
284 bool notify = false;
285 int retval; 284 int retval;
286 285
287 dev_dbg(dev, "%s flags 0x%x\n", __func__, rpmflags); 286 dev_dbg(dev, "%s flags 0x%x\n", __func__, rpmflags);
@@ -383,13 +382,10 @@ static int rpm_suspend(struct device *dev, int rpmflags)
383 if (retval) { 382 if (retval) {
384 __update_runtime_status(dev, RPM_ACTIVE); 383 __update_runtime_status(dev, RPM_ACTIVE);
385 dev->power.deferred_resume = 0; 384 dev->power.deferred_resume = 0;
386 if (retval == -EAGAIN || retval == -EBUSY) { 385 if (retval == -EAGAIN || retval == -EBUSY)
387 if (dev->power.timer_expires == 0)
388 notify = true;
389 dev->power.runtime_error = 0; 386 dev->power.runtime_error = 0;
390 } else { 387 else
391 pm_runtime_cancel_pending(dev); 388 pm_runtime_cancel_pending(dev);
392 }
393 } else { 389 } else {
394 no_callback: 390 no_callback:
395 __update_runtime_status(dev, RPM_SUSPENDED); 391 __update_runtime_status(dev, RPM_SUSPENDED);
@@ -408,9 +404,6 @@ static int rpm_suspend(struct device *dev, int rpmflags)
408 goto out; 404 goto out;
409 } 405 }
410 406
411 if (notify)
412 rpm_idle(dev, 0);
413
414 if (parent && !parent->power.ignore_children) { 407 if (parent && !parent->power.ignore_children) {
415 spin_unlock_irq(&dev->power.lock); 408 spin_unlock_irq(&dev->power.lock);
416 409