diff options
author | Denis Kirjanov <dkirjanov@hera.kernel.org> | 2010-06-02 05:27:04 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2010-06-05 05:23:18 -0400 |
commit | 59d4289b83b11379d867e2f7146904b19cc96404 (patch) | |
tree | 8c2c7d01d411832ce66f58af6cc61f54d3e118a0 /drivers/net/fec.c | |
parent | bb1d912323d5dd50e1079e389f4e964be14f0ae3 (diff) |
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) | |||
1359 | return 0; | 1359 | return 0; |
1360 | } | 1360 | } |
1361 | 1361 | ||
1362 | #ifdef CONFIG_PM | ||
1363 | |||
1362 | static int | 1364 | static int |
1363 | fec_suspend(struct platform_device *dev, pm_message_t state) | 1365 | fec_suspend(struct platform_device *dev, pm_message_t state) |
1364 | { | 1366 | { |
@@ -1389,15 +1391,31 @@ fec_resume(struct platform_device *dev) | |||
1389 | return 0; | 1391 | return 0; |
1390 | } | 1392 | } |
1391 | 1393 | ||
1394 | static const struct dev_pm_ops fec_pm_ops = { | ||
1395 | .suspend = fec_suspend, | ||
1396 | .resume = fec_resume, | ||
1397 | .freeze = fec_suspend, | ||
1398 | .thaw = fec_resume, | ||
1399 | .poweroff = fec_suspend, | ||
1400 | .restore = fec_resume, | ||
1401 | }; | ||
1402 | |||
1403 | #define FEC_PM_OPS (&fec_pm_ops) | ||
1404 | |||
1405 | #else /* !CONFIG_PM */ | ||
1406 | |||
1407 | #define FEC_PM_OPS NULL | ||
1408 | |||
1409 | #endif /* !CONFIG_PM */ | ||
1410 | |||
1392 | static struct platform_driver fec_driver = { | 1411 | static struct platform_driver fec_driver = { |
1393 | .driver = { | 1412 | .driver = { |
1394 | .name = "fec", | 1413 | .name = "fec", |
1395 | .owner = THIS_MODULE, | 1414 | .owner = THIS_MODULE, |
1415 | .pm = FEC_PM_OPS, | ||
1396 | }, | 1416 | }, |
1397 | .probe = fec_probe, | 1417 | .probe = fec_probe, |
1398 | .remove = __devexit_p(fec_drv_remove), | 1418 | .remove = __devexit_p(fec_drv_remove), |
1399 | .suspend = fec_suspend, | ||
1400 | .resume = fec_resume, | ||
1401 | }; | 1419 | }; |
1402 | 1420 | ||
1403 | static int __init | 1421 | static int __init |