]> www.infradead.org Git - users/jedix/linux-maple.git/commitdiff
igb: fix warning about unused function
authorEmil Tantilov <emil.s.tantilov@intel.com>
Sat, 28 Jan 2012 08:10:35 +0000 (08:10 +0000)
committerJoe Jin <joe.jin@oracle.com>
Thu, 17 May 2012 13:07:32 +0000 (21:07 +0800)
This patch fixes a warning about unused function when CONFIG_PM_SLEEP
is not selected in the kernel config:

igb_main.c: warning: `igb_suspend` defined but not used [W-unused-function]

(cherry picked from commit d9dd966d7fc088a6bed991c2b1e2fba4485e0a31)
Signed-off-by: Emil Tantilov <emil.s.tantilov@intel.com>
Tested-by: Aaron Brown <aaron.f.brown@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: Joe Jin <joe.jin@oracle.com>
drivers/net/igb/igb_main.c

index 9cc19a4242ea792641e809c0b9a0a357646826e8..b86acf45bc28d5587a4467a89f82b4c531afd261 100644 (file)
@@ -173,7 +173,9 @@ static int igb_check_vf_assignment(struct igb_adapter *adapter);
 #endif
 
 #ifdef CONFIG_PM
+#ifdef CONFIG_PM_SLEEP
 static int igb_suspend(struct device *);
+#endif
 static int igb_resume(struct device *);
 #ifdef CONFIG_PM_RUNTIME
 static int igb_runtime_suspend(struct device *dev);
@@ -6700,6 +6702,7 @@ static int __igb_shutdown(struct pci_dev *pdev, bool *enable_wake,
 }
 
 #ifdef CONFIG_PM
+#ifdef CONFIG_PM_SLEEP
 static int igb_suspend(struct device *dev)
 {
        int retval;
@@ -6719,6 +6722,7 @@ static int igb_suspend(struct device *dev)
 
        return 0;
 }
+#endif /* CONFIG_PM_SLEEP */
 
 static int igb_resume(struct device *dev)
 {