return 0;
 }
 
-#ifdef CONFIG_PM_SLEEP
 static int twl6030_gpadc_suspend(struct device *pdev)
 {
        int ret;
 
        return 0;
 };
-#endif
 
-static SIMPLE_DEV_PM_OPS(twl6030_gpadc_pm_ops, twl6030_gpadc_suspend,
-                                       twl6030_gpadc_resume);
+static DEFINE_SIMPLE_DEV_PM_OPS(twl6030_gpadc_pm_ops, twl6030_gpadc_suspend,
+                               twl6030_gpadc_resume);
 
 static struct platform_driver twl6030_gpadc_driver = {
        .probe          = twl6030_gpadc_probe,
        .remove         = twl6030_gpadc_remove,
        .driver         = {
                .name   = DRIVER_NAME,
-               .pm     = &twl6030_gpadc_pm_ops,
+               .pm     = pm_sleep_ptr(&twl6030_gpadc_pm_ops),
                .of_match_table = of_twl6030_match_tbl,
        },
 };