]> bbs.cooldavid.org Git - jme.git/commitdiff
jme: Fix compile warning introduced by new pm macro
authorGuo-Fu Tseng <cooldavid@cooldavid.org>
Tue, 28 Jun 2011 04:32:38 +0000 (12:32 +0800)
committerGuo-Fu Tseng <cooldavid@cooldavid.org>
Tue, 28 Jun 2011 07:29:49 +0000 (15:29 +0800)
SIMPLE_DEV_PM_OPS is using SET_SYSTEM_SLEEP_PM_OPS
and SET_SYSTEM_SLEEP_PM_OPS is empty when CONFIG_PM_SLEEP
is not defined.

Switching #ifdef CONFIG_PM to #ifdef CONFIG_PM_SLEEP

jme.c

diff --git a/jme.c b/jme.c
index 3eb01a559309cb27ec6f2b938cde8b459cfb3c5a..1457ce7ae2f826ec6937c769a71c52c0b50d9d62 100644 (file)
--- a/jme.c
+++ b/jme.c
@@ -3331,7 +3331,17 @@ jme_shutdown(struct pci_dev *pdev)
 #endif
 }
 
-#ifdef CONFIG_PM
+#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,25)
+       #ifdef CONFIG_PM
+               #define JME_HAVE_PM
+       #endif
+#else
+       #ifdef CONFIG_PM_SLEEP
+               #define JME_HAVE_PM
+       #endif
+#endif
+
+#ifdef JME_HAVE_PM
 static int
 #if LINUX_VERSION_CODE <= KERNEL_VERSION(2,6,38)
 jme_suspend(struct pci_dev *pdev, pm_message_t state)