diff options
author | Denis Kirjanov <dkirjanov@hera.kernel.org> | 2010-06-02 11:27:04 +0200 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2010-06-05 11:23:18 +0200 |
commit | 59d4289b83b11379d867e2f7146904b19cc96404 (patch) | |
tree | 8c2c7d01d411832ce66f58af6cc61f54d3e118a0 /drivers/net/fec.c | |
parent | bonding: allow user-controlled output slave selection (diff) | |
download | linux-59d4289b83b11379d867e2f7146904b19cc96404.tar.xz linux-59d4289b83b11379d867e2f7146904b19cc96404.zip |
fec: convert legacy PM hooks to dem_pm_ops
This patch compile tested only.
Convert legacy PM hooks to dev_pm_ops
Signed-off-by: Denis Kirjanov <dkirjanov@kernel.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/fec.c')
-rw-r--r-- | drivers/net/fec.c | 22 |
1 files changed, 20 insertions, 2 deletions
diff --git a/drivers/net/fec.c b/drivers/net/fec.c index 25df1b860c0b..a3565adc034c 100644 --- a/drivers/net/fec.c +++ b/drivers/net/fec.c @@ -1359,6 +1359,8 @@ fec_drv_remove(struct platform_device *pdev) return 0; } +#ifdef CONFIG_PM + static int fec_suspend(struct platform_device *dev, pm_message_t state) { @@ -1389,15 +1391,31 @@ fec_resume(struct platform_device *dev) return 0; } +static const struct dev_pm_ops fec_pm_ops = { + .suspend = fec_suspend, + .resume = fec_resume, + .freeze = fec_suspend, + .thaw = fec_resume, + .poweroff = fec_suspend, + .restore = fec_resume, +}; + +#define FEC_PM_OPS (&fec_pm_ops) + +#else /* !CONFIG_PM */ + +#define FEC_PM_OPS NULL + +#endif /* !CONFIG_PM */ + static struct platform_driver fec_driver = { .driver = { .name = "fec", .owner = THIS_MODULE, + .pm = FEC_PM_OPS, }, .probe = fec_probe, .remove = __devexit_p(fec_drv_remove), - .suspend = fec_suspend, - .resume = fec_resume, }; static int __init |