Merge branch 'pm-sleep'
authorRafael J. Wysocki <rjw@sisk.pl>
Mon, 24 Sep 2012 11:31:38 +0000 (13:31 +0200)
committerRafael J. Wysocki <rjw@sisk.pl>
Mon, 24 Sep 2012 11:31:38 +0000 (13:31 +0200)
* pm-sleep:
  PM: Prevent runtime suspend during system resume
  PM / Sleep: use resume event when call dpm_resume_early

Conflicts:
drivers/base/power/main.c (trivial)

1  2 
drivers/base/power/main.c
drivers/pci/pci-driver.c

@@@ -1231,9 -1208,14 +1230,17 @@@ static int device_prepare(struct devic
        char *info = NULL;
        int error = 0;
  
 +      if (dev->power.syscore)
 +              return 0;
 +
+       /*
+        * If a device's parent goes into runtime suspend at the wrong time,
+        * it won't be possible to resume the device.  To prevent this we
+        * block runtime suspend here, during the prepare phase, and allow
+        * it again during the complete phase.
+        */
+       pm_runtime_get_noresume(dev);
        device_lock(dev);
  
        dev->power.wakeup_path = device_may_wakeup(dev);
Simple merge