mirror of https://gitee.com/openkylin/linux.git
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: 9e85e22713
("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>
This commit is contained in:
parent
81a8b07996
commit
cf87615d15
|
@ -2585,7 +2585,6 @@ static int bcm_sysport_remove(struct platform_device *pdev)
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef CONFIG_PM_SLEEP
|
|
||||||
static int bcm_sysport_suspend_to_wol(struct bcm_sysport_priv *priv)
|
static int bcm_sysport_suspend_to_wol(struct bcm_sysport_priv *priv)
|
||||||
{
|
{
|
||||||
struct net_device *ndev = priv->netdev;
|
struct net_device *ndev = priv->netdev;
|
||||||
|
@ -2650,7 +2649,7 @@ static int bcm_sysport_suspend_to_wol(struct bcm_sysport_priv *priv)
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
static int bcm_sysport_suspend(struct device *d)
|
static int __maybe_unused bcm_sysport_suspend(struct device *d)
|
||||||
{
|
{
|
||||||
struct net_device *dev = dev_get_drvdata(d);
|
struct net_device *dev = dev_get_drvdata(d);
|
||||||
struct bcm_sysport_priv *priv = netdev_priv(dev);
|
struct bcm_sysport_priv *priv = netdev_priv(dev);
|
||||||
|
@ -2712,7 +2711,7 @@ static int bcm_sysport_suspend(struct device *d)
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
static int bcm_sysport_resume(struct device *d)
|
static int __maybe_unused bcm_sysport_resume(struct device *d)
|
||||||
{
|
{
|
||||||
struct net_device *dev = dev_get_drvdata(d);
|
struct net_device *dev = dev_get_drvdata(d);
|
||||||
struct bcm_sysport_priv *priv = netdev_priv(dev);
|
struct bcm_sysport_priv *priv = netdev_priv(dev);
|
||||||
|
@ -2805,7 +2804,6 @@ static int bcm_sysport_resume(struct device *d)
|
||||||
bcm_sysport_fini_tx_ring(priv, i);
|
bcm_sysport_fini_tx_ring(priv, i);
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
|
|
||||||
static SIMPLE_DEV_PM_OPS(bcm_sysport_pm_ops,
|
static SIMPLE_DEV_PM_OPS(bcm_sysport_pm_ops,
|
||||||
bcm_sysport_suspend, bcm_sysport_resume);
|
bcm_sysport_suspend, bcm_sysport_resume);
|
||||||
|
|
Loading…
Reference in New Issue