From fda5634a662b227a432d611ce756c3516ece131b Mon Sep 17 00:00:00 2001 From: Guo-Fu Tseng Date: Tue, 28 Jun 2011 12:32:38 +0800 Subject: [PATCH] jme: Fix compile warning introduced by new pm macro 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 | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/jme.c b/jme.c index 3eb01a5..1457ce7 100644 --- 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) -- 2.39.3