return devm_of_platform_populate(dev);
 }
 
-#ifdef CONFIG_PM_SLEEP
 static int stpmic1_suspend(struct device *dev)
 {
        struct i2c_client *i2c = to_i2c_client(dev);
 
        return 0;
 }
-#endif
 
-static SIMPLE_DEV_PM_OPS(stpmic1_pm, stpmic1_suspend, stpmic1_resume);
+static DEFINE_SIMPLE_DEV_PM_OPS(stpmic1_pm, stpmic1_suspend, stpmic1_resume);
 
 static const struct of_device_id stpmic1_of_match[] = {
        { .compatible = "st,stpmic1", },
        .driver = {
                .name = "stpmic1",
                .of_match_table = of_match_ptr(stpmic1_of_match),
-               .pm = &stpmic1_pm,
+               .pm = pm_sleep_ptr(&stpmic1_pm),
        },
        .probe_new = stpmic1_probe,
 };