public inbox for netdev@vger.kernel.org
 help / color / mirror / Atom feed
From: Fabio Estevam <festevam@gmail.com>
To: davem@davemloft.net
Cc: netdev@vger.kernel.org, joe@perches.com,
	Fabio Estevam <fabio.estevam@freescale.com>
Subject: [PATCH] atl1: Protect atl1_suspend with CONFIG_PM_SLEEP
Date: Tue, 16 Apr 2013 18:35:00 -0300	[thread overview]
Message-ID: <1366148100-5617-1-git-send-email-festevam@gmail.com> (raw)

From: Fabio Estevam <fabio.estevam@freescale.com>

commit 7b7a2bbb690 (atl1: Remove unneeded PM_OPS definitions) removed the 
definition of atl1_suspend for the !CONFIG_PM_SLEEP case.

So only call atl1_suspend() when CONFIG_PM_SLEEP is defined and fix the 
following build error from randconfig:

drivers/net/ethernet/atheros/atlx/atl1.c: In function 'atl1_shutdown':
drivers/net/ethernet/atheros/atlx/atl1.c:2888:2: error: implicit declaration of function 'atl1_suspend' [-Werror=implicit-function-declaration]

Reported-by: kbuild test robot <fengguang.wu@intel.com>
Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
---
 drivers/net/ethernet/atheros/atlx/atl1.c |    2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/net/ethernet/atheros/atlx/atl1.c b/drivers/net/ethernet/atheros/atlx/atl1.c
index 9843c70..8338013 100644
--- a/drivers/net/ethernet/atheros/atlx/atl1.c
+++ b/drivers/net/ethernet/atheros/atlx/atl1.c
@@ -2885,7 +2885,9 @@ static void atl1_shutdown(struct pci_dev *pdev)
 	struct net_device *netdev = pci_get_drvdata(pdev);
 	struct atl1_adapter *adapter = netdev_priv(netdev);
 
+#ifdef CONFIG_PM_SLEEP
 	atl1_suspend(&pdev->dev);
+#endif
 	pci_wake_from_d3(pdev, adapter->wol);
 	pci_set_power_state(pdev, PCI_D3hot);
 }
-- 
1.7.9.5

             reply	other threads:[~2013-04-16 21:35 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-04-16 21:35 Fabio Estevam [this message]
2013-04-16 21:45 ` [PATCH] atl1: Protect atl1_suspend with CONFIG_PM_SLEEP Sergei Shtylyov
2013-04-16 21:47 ` David Miller

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=1366148100-5617-1-git-send-email-festevam@gmail.com \
    --to=festevam@gmail.com \
    --cc=davem@davemloft.net \
    --cc=fabio.estevam@freescale.com \
    --cc=joe@perches.com \
    --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