summaryrefslogtreecommitdiff
path: root/include/uapi/linux/eventpoll.h
diff options
context:
space:
mode:
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>2013-12-17 04:36:37 +0400
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2013-12-17 04:36:37 +0400
commit6a8c62f3e97fdf184fde60bc99155476e8e9cd55 (patch)
tree71b818d584f79baf1a192df65c758a592a63360d /include/uapi/linux/eventpoll.h
parentb46d0c46ccaa366a5bb8ac709fdf2bcaa76221fd (diff)
parent319e2e3f63c348a9b66db4667efa73178e18b17d (diff)
downloadlinux-6a8c62f3e97fdf184fde60bc99155476e8e9cd55.tar.xz
Merge 3.13-rc4 into tty-next
We want the fixes in here as well.
Diffstat (limited to 'include/uapi/linux/eventpoll.h')
-rw-r--r--include/uapi/linux/eventpoll.h13
1 files changed, 12 insertions, 1 deletions
diff --git a/include/uapi/linux/eventpoll.h b/include/uapi/linux/eventpoll.h
index 2c267bcbb85c..bc81fb2e1f0e 100644
--- a/include/uapi/linux/eventpoll.h
+++ b/include/uapi/linux/eventpoll.h
@@ -61,5 +61,16 @@ struct epoll_event {
__u64 data;
} EPOLL_PACKED;
-
+#ifdef CONFIG_PM_SLEEP
+static inline void ep_take_care_of_epollwakeup(struct epoll_event *epev)
+{
+ if ((epev->events & EPOLLWAKEUP) && !capable(CAP_BLOCK_SUSPEND))
+ epev->events &= ~EPOLLWAKEUP;
+}
+#else
+static inline void ep_take_care_of_epollwakeup(struct epoll_event *epev)
+{
+ epev->events &= ~EPOLLWAKEUP;
+}
+#endif
#endif /* _UAPI_LINUX_EVENTPOLL_H */