aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEric Benard <eric@eukrea.com>2010-06-18 00:19:54 -0400
committerDavid S. Miller <davem@davemloft.net>2010-06-26 00:33:14 -0400
commit87cad5c385877ce45244886748564672fd6db035 (patch)
treef8b11f2281545b46b0865372e61a722487699088
parentd05f6cf01cc5241ddaca6e122021e64441fe08f3 (diff)
net/fec: clean suspend/resume
Commit 59d4289b83b11379d867e2f7146904b19cc96404 converted fec to dev_pm_ops but didn't update the suspend/resume functions thus leading to the following warning : "initialization from incompatible pointer type" when CONFIG_PM is set. This patch also fixe a few indentation and style around CONFIG_PM area. Signed-off-by: Eric BĂ©nard <eric@eukrea.com> Cc: netdev@vger.kernel.org Cc: davem@davemloft.net Cc: amit.kucheria@canonical.com Cc: s.hauer@pengutronix.de Cc: linux-arm-kernel@lists.infradead.org Signed-off-by: David S. Miller <davem@davemloft.net>
-rw-r--r--drivers/net/fec.c30
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
1364static int 1363static int
1365fec_suspend(struct platform_device *dev, pm_message_t state) 1364fec_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
1379static int 1378static int
1380fec_resume(struct platform_device *dev) 1379fec_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
1411static struct platform_driver fec_driver = { 1403static 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
1421static int __init 1415static int __init