backports: override pm_wakeup_event() on 2.6.36
authorJohannes Berg <johannes.berg@intel.com>
Mon, 15 Apr 2013 08:34:26 +0000 (10:34 +0200)
committerJohannes Berg <johannes.berg@intel.com>
Mon, 15 Apr 2013 09:32:48 +0000 (11:32 +0200)
This may not be the right thing to do, but it resolves
linking the TI driver on 2.6.36 where pm_wakeup_event()
is declared but not always exported.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
backport/backport-include/linux/device.h

index f672a99b55f05ac4f5b08d9e531f77deecbd9f99..f37dbab731e2c59f35616996165e6121161f86d6 100644 (file)
@@ -88,8 +88,15 @@ do {                                                                 \
 
 #if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,36)
 #define device_rename(dev, new_name) device_rename(dev, (char *)new_name)
+#endif
 
-/* this belongs into pm_wakeup.h but that isn't included directly */
+#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,37)
+/*
+ * This belongs into pm_wakeup.h but that isn't included directly.
+ * Note that on 2.6.36, this was defined but not exported, so we
+ * need to override it.
+ */
+#define pm_wakeup_event LINUX_BACKPORT(pm_wakeup_event)
 static inline void pm_wakeup_event(struct device *dev, unsigned int msec) {}
 #endif