epoll: Add a flag, EPOLLWAKEUP, to prevent suspend while epoll events are ready
authorArve Hjønnevåg <arve@android.com>
Tue, 1 May 2012 19:33:34 +0000 (21:33 +0200)
committerRafael J. Wysocki <rjw@sisk.pl>
Sat, 5 May 2012 19:50:41 +0000 (21:50 +0200)
commit4d7e30d98939a0340022ccd49325a3d70f7e0238
tree45307bd3a0b7fafc71aea41fc518f42e2e810e76
parentb86ff9820fd5df69295273b9aa68e58786ffc23f
epoll: Add a flag, EPOLLWAKEUP, to prevent suspend while epoll events are ready

When an epoll_event, that has the EPOLLWAKEUP flag set, is ready, a
wakeup_source will be active to prevent suspend. This can be used to
handle wakeup events from a driver that support poll, e.g. input, if
that driver wakes up the waitqueue passed to epoll before allowing
suspend.

Signed-off-by: Arve Hjønnevåg <arve@android.com>
Reviewed-by: NeilBrown <neilb@suse.de>
Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
fs/eventpoll.c
include/linux/capability.h
include/linux/eventpoll.h