Merge tag 'pm-3.13-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm
Pull power management fixes from Rafael Wysocki: - cpufreq regression fix from Bjørn Mork restoring the pre-3.12 behavior of the framework during system suspend/hibernation to avoid garbage sysfs files from being left behind in case of a suspend error - PNP regression fix to restore the correct states of devices after resume from hibernation broken in 3.12. From Dmitry Torokhov. - cpuidle fix to prevent cpuidle device unregistration from crashing due to a NULL pointer dereference if cpuidle has been disabled from the kernel command line. From Konrad Rzeszutek Wilk. - intel_idle fix for the C6 state definition on Intel Avoton/Rangeley processors from Arne Bockholdt. - Power capping framework fix to make the energy_uj sysfs attribute work in accordance with the documentation. From Srinivas Pandruvada. - epoll fix to make it ignore the EPOLLWAKEUP flag if the kernel has been compiled with CONFIG_PM_SLEEP unset (in which case that flag should not have any effect). From Amit Pundir. - cpufreq fix to prevent governor sysfs files from being lost over system suspend/resume in some (arguably unusual) situations. From Viresh Kumar. * tag 'pm-3.13-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm: PowerCap: Fix mode for energy counter PNP: fix restoring devices after hibernation cpuidle: Check for dev before deregistering it. epoll: drop EPOLLWAKEUP if PM_SLEEP is disabled cpufreq: fix garbage kobjects on errors during suspend/resume cpufreq: suspend governors on system suspend/hibernate intel_idle: Fixed C6 state on Avoton/Rangeley processors
This commit is contained in:
@@ -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 */
|
||||
|
||||
Reference in New Issue
Block a user