]> git.proxmox.com Git - mirror_ubuntu-artful-kernel.git/commit - drivers/base/power/wakeup.c
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>
Tue, 1 May 2012 19:24:59 +0000 (21:24 +0200)
commit60af1066913162c5dd13fad3b872a67b1eb7da0f
treebd2c66ce4c9f78625c018674feedd482a4da97f4
parent52d136cc2cf6659ee247dbcc88c9e7bd7428ad06
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