aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorFabio Estevam <fabio.estevam@freescale.com>2013-04-16 17:35:00 -0400
committerDavid S. Miller <davem@davemloft.net>2013-04-16 17:46:24 -0400
commit98d2f0e68c4de36c56fbe3baeae30c001f012243 (patch)
treea1435a908ffdc991e3c4f76b7af59f4f9be1120c /drivers
parent264f0ef766d6e9fcc1b4c3afd288a20ee05ef541 (diff)
atl1: Protect atl1_suspend with CONFIG_PM_SLEEP
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> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/net/ethernet/atheros/atlx/atl1.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/net/ethernet/atheros/atlx/atl1.c b/drivers/net/ethernet/atheros/atlx/atl1.c
index 9843c7059b6c..8338013ab33d 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)
2885 struct net_device *netdev = pci_get_drvdata(pdev); 2885 struct net_device *netdev = pci_get_drvdata(pdev);
2886 struct atl1_adapter *adapter = netdev_priv(netdev); 2886 struct atl1_adapter *adapter = netdev_priv(netdev);
2887 2887
2888#ifdef CONFIG_PM_SLEEP
2888 atl1_suspend(&pdev->dev); 2889 atl1_suspend(&pdev->dev);
2890#endif
2889 pci_wake_from_d3(pdev, adapter->wol); 2891 pci_wake_from_d3(pdev, adapter->wol);
2890 pci_set_power_state(pdev, PCI_D3hot); 2892 pci_set_power_state(pdev, PCI_D3hot);
2891} 2893}