Using SIMPLE_DEV_PM_OPS can make the code smaller and simpler.
Also change CONFIG_PM to CONFIG_PM_SLEEP.
Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
        return 0;
 }
 
-#ifdef CONFIG_PM
+#ifdef CONFIG_PM_SLEEP
 static int
 fec_suspend(struct device *dev)
 {
 
        return 0;
 }
+#endif /* CONFIG_PM_SLEEP */
 
-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,
-};
-#endif
+static SIMPLE_DEV_PM_OPS(fec_pm_ops, fec_suspend, fec_resume);
 
 static struct platform_driver fec_driver = {
        .driver = {
                .name   = DRIVER_NAME,
                .owner  = THIS_MODULE,
-#ifdef CONFIG_PM
                .pm     = &fec_pm_ops,
-#endif
                .of_match_table = fec_dt_ids,
        },
        .id_table = fec_devtype,