[PATCH 2.6.20-rc5 3/4] atl1: properly use CONFIG_PM

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



From: Jay Cliburn <[email protected]>

Fix power management by properly using ifdef CONFIG_PM.  Discovered by
and modification suggested by Andrew Morton.

Signed-off-by: Jay Cliburn <[email protected]>
---

 drivers/net/atl1/atl1_main.c |    7 +++++--
 1 files changed, 5 insertions(+), 2 deletions(-)

diff --git a/drivers/net/atl1/atl1_main.c b/drivers/net/atl1/atl1_main.c
index a9e02d1..1045325 100644
--- a/drivers/net/atl1/atl1_main.c
+++ b/drivers/net/atl1/atl1_main.c
@@ -2345,6 +2345,7 @@ static void __devexit atl1_remove(struct pci_dev *pdev)
 	pci_disable_device(pdev);
 }
 
+#ifdef CONFIG_PM
 static int atl1_suspend(struct pci_dev *pdev, pm_message_t state)
 {
 	struct net_device *netdev = pci_get_drvdata(pdev);
@@ -2438,6 +2439,10 @@ static int atl1_resume(struct pci_dev *pdev)
 
 	return 0;
 }
+#else
+#define atl1_suspend NULL
+#define atl1_resume NULL
+#endif
 
 static struct pci_driver atl1_driver = {
 	.name = atl1_driver_name,
@@ -2446,10 +2451,8 @@ static struct pci_driver atl1_driver = {
 	.remove = __devexit_p(atl1_remove),
 	/* Power Managment Hooks */
 	/* probably broken right now -- CHS */
-#ifdef CONFIG_PM
 	.suspend = atl1_suspend,
 	.resume = atl1_resume
-#endif
 };
 
 /**
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Stuff]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]     [Linux Resources]
  Powered by Linux