aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorArnd Bergmann <arnd@arndb.de>2018-08-13 18:10:34 -0400
committerDavid S. Miller <davem@davemloft.net>2018-08-13 23:45:49 -0400
commitcf87615d15f37182b2a3a4cd722288d3d5956900 (patch)
tree69ea7894a0f041323268b959fc60dfca052acef0
parent81a8b0799632627b587af31ecd06112397e4ec36 (diff)
net: systemport: fix unused function warning
The only remaining caller of this function is inside of an #ifdef after another caller got removed. This causes a harmless warning in some configurations: drivers/net/ethernet/broadcom/bcmsysport.c:1068:13: error: 'bcm_sysport_resume_from_wol' defined but not used [-Werror=unused-function] Removing the #ifdef around the PM functions simplifies the code and avoids the problem but letting the compiler drop the unused functions silently. Fixes: 9e85e22713d6 ("net: systemport: Do not re-configure upon WoL interrupt") Signed-off-by: Arnd Bergmann <arnd@arndb.de> Acked-by: Florian Fainelli <f.fainelli@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
-rw-r--r--drivers/net/ethernet/broadcom/bcmsysport.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/drivers/net/ethernet/broadcom/bcmsysport.c b/drivers/net/ethernet/broadcom/bcmsysport.c
index ca47309d4494..147045757b10 100644
--- a/drivers/net/ethernet/broadcom/bcmsysport.c
+++ b/drivers/net/ethernet/broadcom/bcmsysport.c
@@ -2585,7 +2585,6 @@ static int bcm_sysport_remove(struct platform_device *pdev)
2585 return 0; 2585 return 0;
2586} 2586}
2587 2587
2588#ifdef CONFIG_PM_SLEEP
2589static int bcm_sysport_suspend_to_wol(struct bcm_sysport_priv *priv) 2588static int bcm_sysport_suspend_to_wol(struct bcm_sysport_priv *priv)
2590{ 2589{
2591 struct net_device *ndev = priv->netdev; 2590 struct net_device *ndev = priv->netdev;
@@ -2650,7 +2649,7 @@ static int bcm_sysport_suspend_to_wol(struct bcm_sysport_priv *priv)
2650 return 0; 2649 return 0;
2651} 2650}
2652 2651
2653static int bcm_sysport_suspend(struct device *d) 2652static int __maybe_unused bcm_sysport_suspend(struct device *d)
2654{ 2653{
2655 struct net_device *dev = dev_get_drvdata(d); 2654 struct net_device *dev = dev_get_drvdata(d);
2656 struct bcm_sysport_priv *priv = netdev_priv(dev); 2655 struct bcm_sysport_priv *priv = netdev_priv(dev);
@@ -2712,7 +2711,7 @@ static int bcm_sysport_suspend(struct device *d)
2712 return ret; 2711 return ret;
2713} 2712}
2714 2713
2715static int bcm_sysport_resume(struct device *d) 2714static int __maybe_unused bcm_sysport_resume(struct device *d)
2716{ 2715{
2717 struct net_device *dev = dev_get_drvdata(d); 2716 struct net_device *dev = dev_get_drvdata(d);
2718 struct bcm_sysport_priv *priv = netdev_priv(dev); 2717 struct bcm_sysport_priv *priv = netdev_priv(dev);
@@ -2805,7 +2804,6 @@ out_free_tx_rings:
2805 bcm_sysport_fini_tx_ring(priv, i); 2804 bcm_sysport_fini_tx_ring(priv, i);
2806 return ret; 2805 return ret;
2807} 2806}
2808#endif
2809 2807
2810static SIMPLE_DEV_PM_OPS(bcm_sysport_pm_ops, 2808static SIMPLE_DEV_PM_OPS(bcm_sysport_pm_ops,
2811 bcm_sysport_suspend, bcm_sysport_resume); 2809 bcm_sysport_suspend, bcm_sysport_resume);