diff options
-rw-r--r-- | drivers/net/fec.c | 30 |
1 files changed, 12 insertions, 18 deletions
diff --git a/drivers/net/fec.c b/drivers/net/fec.c index a3cae4ed6ac9..b4afd7a6ee29 100644 --- a/drivers/net/fec.c +++ b/drivers/net/fec.c | |||
@@ -1360,11 +1360,10 @@ fec_drv_remove(struct platform_device *pdev) | |||
1360 | } | 1360 | } |
1361 | 1361 | ||
1362 | #ifdef CONFIG_PM | 1362 | #ifdef CONFIG_PM |
1363 | |||
1364 | static int | 1363 | static int |
1365 | fec_suspend(struct platform_device *dev, pm_message_t state) | 1364 | fec_suspend(struct device *dev) |
1366 | { | 1365 | { |
1367 | struct net_device *ndev = platform_get_drvdata(dev); | 1366 | struct net_device *ndev = dev_get_drvdata(dev); |
1368 | struct fec_enet_private *fep; | 1367 | struct fec_enet_private *fep; |
1369 | 1368 | ||
1370 | if (ndev) { | 1369 | if (ndev) { |
@@ -1377,9 +1376,9 @@ fec_suspend(struct platform_device *dev, pm_message_t state) | |||
1377 | } | 1376 | } |
1378 | 1377 | ||
1379 | static int | 1378 | static int |
1380 | fec_resume(struct platform_device *dev) | 1379 | fec_resume(struct device *dev) |
1381 | { | 1380 | { |
1382 | struct net_device *ndev = platform_get_drvdata(dev); | 1381 | struct net_device *ndev = dev_get_drvdata(dev); |
1383 | struct fec_enet_private *fep; | 1382 | struct fec_enet_private *fep; |
1384 | 1383 | ||
1385 | if (ndev) { | 1384 | if (ndev) { |
@@ -1399,23 +1398,18 @@ static const struct dev_pm_ops fec_pm_ops = { | |||
1399 | .poweroff = fec_suspend, | 1398 | .poweroff = fec_suspend, |
1400 | .restore = fec_resume, | 1399 | .restore = fec_resume, |
1401 | }; | 1400 | }; |
1402 | 1401 | #endif | |
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 | 1402 | ||
1411 | static struct platform_driver fec_driver = { | 1403 | static struct platform_driver fec_driver = { |
1412 | .driver = { | 1404 | .driver = { |
1413 | .name = "fec", | 1405 | .name = "fec", |
1414 | .owner = THIS_MODULE, | 1406 | .owner = THIS_MODULE, |
1415 | .pm = FEC_PM_OPS, | 1407 | #ifdef CONFIG_PM |
1408 | .pm = &fec_pm_ops, | ||
1409 | #endif | ||
1416 | }, | 1410 | }, |
1417 | .probe = fec_probe, | 1411 | .probe = fec_probe, |
1418 | .remove = __devexit_p(fec_drv_remove), | 1412 | .remove = __devexit_p(fec_drv_remove), |
1419 | }; | 1413 | }; |
1420 | 1414 | ||
1421 | static int __init | 1415 | static int __init |