]> git.karo-electronics.de Git - karo-tx-linux.git/commit
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)
committerRafael J. Wysocki <rjw@sisk.pl>
Sun, 29 Apr 2012 20:52:34 +0000 (22:52 +0200)
commit455901781fa7328074bde97677d527cbaef30332
tree4ed1cffab351bd5fdeba6d152eaf34d4e5467bd4
parent2d8be5a6ed4987709dc38dafa102b46451fb1385
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