提交 98d2f0e6 编写于 作者: F Fabio Estevam 提交者: David S. Miller

atl1: Protect atl1_suspend with CONFIG_PM_SLEEP

commit 7b7a2bbb (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: Nkbuild test robot <fengguang.wu@intel.com>
Signed-off-by: NFabio Estevam <fabio.estevam@freescale.com>
Signed-off-by: NDavid S. Miller <davem@davemloft.net>
上级 264f0ef7
......@@ -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);
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册