clk_disable_unprepare(dwmac->clk);
 }
 
-#ifdef CONFIG_PM_SLEEP
 static int sti_dwmac_suspend(struct device *dev)
 {
        struct sti_dwmac *dwmac = get_stmmac_bsp_priv(dev);
 
        return stmmac_resume(dev);
 }
-#endif /* CONFIG_PM_SLEEP */
 
-static SIMPLE_DEV_PM_OPS(sti_dwmac_pm_ops, sti_dwmac_suspend,
-                                          sti_dwmac_resume);
+static DEFINE_SIMPLE_DEV_PM_OPS(sti_dwmac_pm_ops, sti_dwmac_suspend,
+                                                 sti_dwmac_resume);
 
 static const struct sti_dwmac_of_data stih4xx_dwmac_data = {
        .fix_retime_src = stih4xx_fix_retime_src,
        .remove = sti_dwmac_remove,
        .driver = {
                .name           = "sti-dwmac",
-               .pm             = &sti_dwmac_pm_ops,
+               .pm             = pm_sleep_ptr(&sti_dwmac_pm_ops),
                .of_match_table = sti_dwmac_match,
        },
 };