PM / Wakeup: Replace pm_check_wakeup_events() with pm_wakeup_pending()

To avoid confusion with the meaning and return value of
pm_check_wakeup_events() replace it with pm_wakeup_pending() that
will work the other way around (ie. return true when system-wide
power transition should be aborted).

Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
This commit is contained in:
Rafael J. Wysocki
2010-12-03 22:58:31 +01:00
parent 1e75227ef0
commit a2867e08c8
6 changed files with 17 additions and 17 deletions
+2 -2
View File
@@ -278,7 +278,7 @@ static int create_image(int platform_mode)
goto Enable_irqs;
}
if (hibernation_test(TEST_CORE) || !pm_check_wakeup_events())
if (hibernation_test(TEST_CORE) || pm_wakeup_pending())
goto Power_up;
in_suspend = 1;
@@ -516,7 +516,7 @@ int hibernation_platform_enter(void)
local_irq_disable();
sysdev_suspend(PMSG_HIBERNATE);
if (!pm_check_wakeup_events()) {
if (pm_wakeup_pending()) {
error = -EAGAIN;
goto Power_up;
}
+1 -1
View File
@@ -85,7 +85,7 @@ static int try_to_freeze_tasks(bool sig_only)
if (!todo || time_after(jiffies, end_time))
break;
if (!pm_check_wakeup_events()) {
if (pm_wakeup_pending()) {
wakeup = true;
break;
}
+1 -1
View File
@@ -163,7 +163,7 @@ static int suspend_enter(suspend_state_t state)
error = sysdev_suspend(PMSG_SUSPEND);
if (!error) {
if (!suspend_test(TEST_CORE) && pm_check_wakeup_events()) {
if (!(suspend_test(TEST_CORE) || pm_wakeup_pending())) {
error = suspend_ops->enter(state);
events_check_enabled = false;
}