Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

authored by

Denis Kirjanov and committed by
David S. Miller
59d4289b bb1d9123

+20 -2
+20 -2
drivers/net/fec.c
··· 1359 1359 return 0; 1360 1360 } 1361 1361 1362 + #ifdef CONFIG_PM 1363 + 1362 1364 static int 1363 1365 fec_suspend(struct platform_device *dev, pm_message_t state) 1364 1366 { ··· 1391 1389 return 0; 1392 1390 } 1393 1391 1392 + static const struct dev_pm_ops fec_pm_ops = { 1393 + .suspend = fec_suspend, 1394 + .resume = fec_resume, 1395 + .freeze = fec_suspend, 1396 + .thaw = fec_resume, 1397 + .poweroff = fec_suspend, 1398 + .restore = fec_resume, 1399 + }; 1400 + 1401 + #define FEC_PM_OPS (&fec_pm_ops) 1402 + 1403 + #else /* !CONFIG_PM */ 1404 + 1405 + #define FEC_PM_OPS NULL 1406 + 1407 + #endif /* !CONFIG_PM */ 1408 + 1394 1409 static struct platform_driver fec_driver = { 1395 1410 .driver = { 1396 1411 .name = "fec", 1397 1412 .owner = THIS_MODULE, 1413 + .pm = FEC_PM_OPS, 1398 1414 }, 1399 1415 .probe = fec_probe, 1400 1416 .remove = __devexit_p(fec_drv_remove), 1401 - .suspend = fec_suspend, 1402 - .resume = fec_resume, 1403 1417 }; 1404 1418 1405 1419 static int __init