diff options
author | Fabio Estevam <fabio.estevam@freescale.com> | 2014-07-24 18:24:01 -0300 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2014-07-24 23:26:18 -0700 |
commit | dd66d386552ad3687530c1bd0e001e96a060cc0f (patch) | |
tree | d45cb777f0dc1540ad97f847e77f0179783588aa /drivers/net/ethernet/freescale | |
parent | e40f5c72347d535352b6631850a26b23a7f11eca (diff) | |
download | op-kernel-dev-dd66d386552ad3687530c1bd0e001e96a060cc0f.zip op-kernel-dev-dd66d386552ad3687530c1bd0e001e96a060cc0f.tar.gz |
fec: Simplify the PM related hooks
Get rid of the CONFIG_PM_SLEEP ifdef by annotating the suspend/resume functions
with '__maybe_unused' in order to keep the code simpler and shorter.
While at it, declare the suspend/resume functions in a single line.
Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/freescale')
-rw-r--r-- | drivers/net/ethernet/freescale/fec_main.c | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/drivers/net/ethernet/freescale/fec_main.c b/drivers/net/ethernet/freescale/fec_main.c index e0efb21..66fe1f6 100644 --- a/drivers/net/ethernet/freescale/fec_main.c +++ b/drivers/net/ethernet/freescale/fec_main.c @@ -2696,9 +2696,7 @@ fec_drv_remove(struct platform_device *pdev) return 0; } -#ifdef CONFIG_PM_SLEEP -static int -fec_suspend(struct device *dev) +static int __maybe_unused fec_suspend(struct device *dev) { struct net_device *ndev = dev_get_drvdata(dev); struct fec_enet_private *fep = netdev_priv(ndev); @@ -2723,8 +2721,7 @@ fec_suspend(struct device *dev) return 0; } -static int -fec_resume(struct device *dev) +static int __maybe_unused fec_resume(struct device *dev) { struct net_device *ndev = dev_get_drvdata(dev); struct fec_enet_private *fep = netdev_priv(ndev); @@ -2759,7 +2756,6 @@ failed_clk: regulator_disable(fep->reg_phy); return ret; } -#endif /* CONFIG_PM_SLEEP */ static SIMPLE_DEV_PM_OPS(fec_pm_ops, fec_suspend, fec_resume); |