PM / Runtime: Update last_busy in rpm_resume
authorTony Lindgren <tony@atomide.com>
Wed, 13 May 2015 23:36:32 +0000 (16:36 -0700)
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>
Tue, 19 May 2015 23:55:02 +0000 (01:55 +0200)
If we don't update last_busy in rpm_resume, devices can go back
to sleep immediately after resume. This happens at least in
cases where the device has been powered off and does not have
any interrupt pending until there's something in the FIFO.

Signed-off-by: Tony Lindgren <tony@atomide.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
drivers/base/power/runtime.c

index 5070c4fe8542fc85ffa9afd0a945eb8d83048eac..4ffe4a2add76631a05e9221819307abe2b4ce08f 100644 (file)
@@ -741,6 +741,7 @@ static int rpm_resume(struct device *dev, int rpmflags)
        } else {
  no_callback:
                __update_runtime_status(dev, RPM_ACTIVE);
+               pm_runtime_mark_last_busy(dev);
                if (parent)
                        atomic_inc(&parent->power.child_count);
        }