PM / Sleep: Use wait queue to signal "no wakeup events in progress"
authorRafael J. Wysocki <rjw@sisk.pl>
Sun, 29 Apr 2012 20:52:34 +0000 (22:52 +0200)
committerVarun Wadekar <vwadekar@nvidia.com>
Mon, 23 Jul 2012 08:35:30 +0000 (13:35 +0530)
commit9db48b054a8e007e63c2b3be94c1c3bcda92a0d2
treea9d5a25ef51cfc442b0ee4462b7cb71ed59d2dd7
parent70739784f09c496674e66f879217223ae811244b
PM / Sleep: Use wait queue to signal "no wakeup events in progress"

The current wakeup source deactivation code doesn't do anything when
the counter of wakeup events in progress goes down to zero, which
requires pm_get_wakeup_count() to poll that counter periodically.
Although this reduces the average time it takes to deactivate a
wakeup source, it also may lead to a substantial amount of unnecessary
polling if there are extended periods of wakeup activity.  Thus it
seems reasonable to use a wait queue for signaling the "no wakeup
events in progress" condition and remove the polling.

Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
Acked-by: mark gross <markgross@thegnar.org>
Acked-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/base/power/wakeup.c