From: Luis R. Rodriguez Date: Wed, 25 Aug 2010 22:27:51 +0000 (-0700) Subject: compat: define PM_EVENT_SLEEP only if not defined X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=6561208a3d30b3f76308892ccc8333eb72496a11;p=openwrt%2Fstaging%2Fblogic.git compat: define PM_EVENT_SLEEP only if not defined This fixes a compilation warning on Ubuntu's 2.6.24 kernel which added the PM_EVENT_SLEEP even though upstream Linux 2.6.24.7 (the last 2.6.24) does not have it. Its a trivial change and I'm willing to support it to avoid compilation. Tested against /lib/modules/2.6.24-27-lpia/build These kernel headers can be foudn here: http://kernel.org/pub/linux/kernel/people/mcgrof/ubuntu/debs/kernel-headers/ Install with dpkg -i --force-architecture *.deb Signed-off-by: Luis R. Rodriguez --- diff --git a/include/linux/compat-2.6.25.h b/include/linux/compat-2.6.25.h index 8d329b33c038..ad3220a7521c 100644 --- a/include/linux/compat-2.6.25.h +++ b/include/linux/compat-2.6.25.h @@ -58,7 +58,9 @@ int compat_pm_qos_power_deinit(void); * 2.6.25 adds PM_EVENT_HIBERNATE as well here but * we don't have this on <= 2.6.23) */ +#ifndef PM_EVENT_SLEEP /* some distribution have mucked with their own headers to add this.. */ #define PM_EVENT_SLEEP (PM_EVENT_SUSPEND) +#endif /* Although we don't care about wimax this is needed for rfkill input stuff */ #define KEY_WIMAX 246