netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jay Cliburn <jacliburn@bellsouth.net>
To: jeff@garzik.org
Cc: csnook@redhat.com, netdev@vger.kernel.org,
	linux-kernel@vger.kernel.org, atl1-devel@lists.sourceforge.net,
	akpm@osdl.org
Subject: [PATCH 2.6.20-rc5 3/4] atl1: properly use CONFIG_PM
Date: Sat, 27 Jan 2007 18:12:47 -0600	[thread overview]
Message-ID: <20070128001247.GC10269@osprey.hogchain.net> (raw)


From: Jay Cliburn <jacliburn@bellsouth.net>

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

Signed-off-by: Jay Cliburn <jacliburn@bellsouth.net>
---

 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
 };
 
 /**

                 reply	other threads:[~2007-01-28  0:12 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20070128001247.GC10269@osprey.hogchain.net \
    --to=jacliburn@bellsouth.net \
    --cc=akpm@osdl.org \
    --cc=atl1-devel@lists.sourceforge.net \
    --cc=csnook@redhat.com \
    --cc=jeff@garzik.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).