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)
committerVarun Wadekar <vwadekar@nvidia.com>
Mon, 23 Jul 2012 08:38:18 +0000 (13:38 +0530)
commitf08c09923854c6c1946aa974930a367751d565cc
treef2136692c7e1ba4f6dfb316e4cd189bf9a5e5f07
parenta7c9eb116c3c8989131f65874edacc591587290f
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