diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2011-01-10 11:14:53 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2011-01-10 11:14:53 -0500 |
commit | c8940eca75e6d1ea57f6c491a30bd1023c64c9ad (patch) | |
tree | d68944ab9fa8ba3c77b18edc2bd836c7e355b23e /drivers/base/power/wakeup.c | |
parent | 78c92a9fd4b6abbbc1fe1ec335c697cb4e63f252 (diff) | |
parent | 3ae22e8c8ac39daf88ae32f047fb23825be7c646 (diff) |
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/suspend-2.6
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/suspend-2.6:
spi / PM: Support dev_pm_ops
PM: Prototype the pm_generic_ operations
PM / Runtime: Generic resume shouldn't set RPM_ACTIVE unconditionally
PM: Use dev_name() in core device suspend and resume routines
PM: Permit registration of parentless devices during system suspend
PM: Replace the device power.status field with a bit field
PM: Remove redundant checks from core device resume routines
PM: Use a different list of devices for each stage of device suspend
PM: Avoid compiler warning in pm_noirq_op()
PM: Use pm_wakeup_pending() in __device_suspend()
PM / Wakeup: Replace pm_check_wakeup_events() with pm_wakeup_pending()
PM: Prevent dpm_prepare() from returning errors unnecessarily
PM: Fix references to basic-pm-debugging.txt in drivers-testing.txt
PM / Runtime: Add synchronous runtime interface for interrupt handlers (v3)
PM / Hibernate: When failed, in_suspend should be reset
PM / Hibernate: hibernation_ops->leave should be checked too
Freezer: Fix a race during freezing of TASK_STOPPED tasks
PM: Use proper ccflag flag in kernel/power/Makefile
PM / Runtime: Fix comments to match runtime callback code
Diffstat (limited to 'drivers/base/power/wakeup.c')
-rw-r--r-- | drivers/base/power/wakeup.c | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/drivers/base/power/wakeup.c b/drivers/base/power/wakeup.c index 71c5528e1c35..8ec406d8f548 100644 --- a/drivers/base/power/wakeup.c +++ b/drivers/base/power/wakeup.c | |||
@@ -542,26 +542,26 @@ static void pm_wakeup_update_hit_counts(void) | |||
542 | } | 542 | } |
543 | 543 | ||
544 | /** | 544 | /** |
545 | * pm_check_wakeup_events - Check for new wakeup events. | 545 | * pm_wakeup_pending - Check if power transition in progress should be aborted. |
546 | * | 546 | * |
547 | * Compare the current number of registered wakeup events with its preserved | 547 | * Compare the current number of registered wakeup events with its preserved |
548 | * value from the past to check if new wakeup events have been registered since | 548 | * value from the past and return true if new wakeup events have been registered |
549 | * the old value was stored. Check if the current number of wakeup events being | 549 | * since the old value was stored. Also return true if the current number of |
550 | * processed is zero. | 550 | * wakeup events being processed is different from zero. |
551 | */ | 551 | */ |
552 | bool pm_check_wakeup_events(void) | 552 | bool pm_wakeup_pending(void) |
553 | { | 553 | { |
554 | unsigned long flags; | 554 | unsigned long flags; |
555 | bool ret = true; | 555 | bool ret = false; |
556 | 556 | ||
557 | spin_lock_irqsave(&events_lock, flags); | 557 | spin_lock_irqsave(&events_lock, flags); |
558 | if (events_check_enabled) { | 558 | if (events_check_enabled) { |
559 | ret = ((unsigned int)atomic_read(&event_count) == saved_count) | 559 | ret = ((unsigned int)atomic_read(&event_count) != saved_count) |
560 | && !atomic_read(&events_in_progress); | 560 | || atomic_read(&events_in_progress); |
561 | events_check_enabled = ret; | 561 | events_check_enabled = !ret; |
562 | } | 562 | } |
563 | spin_unlock_irqrestore(&events_lock, flags); | 563 | spin_unlock_irqrestore(&events_lock, flags); |
564 | if (!ret) | 564 | if (ret) |
565 | pm_wakeup_update_hit_counts(); | 565 | pm_wakeup_update_hit_counts(); |
566 | return ret; | 566 | return ret; |
567 | } | 567 | } |