return 0;
 }
 
-#ifdef CONFIG_PM_SLEEP
 static int mpl3115_suspend(struct device *dev)
 {
        return mpl3115_standby(iio_priv(i2c_get_clientdata(
                data->ctrl_reg1);
 }
 
-static SIMPLE_DEV_PM_OPS(mpl3115_pm_ops, mpl3115_suspend, mpl3115_resume);
-#define MPL3115_PM_OPS (&mpl3115_pm_ops)
-#else
-#define MPL3115_PM_OPS NULL
-#endif
+static DEFINE_SIMPLE_DEV_PM_OPS(mpl3115_pm_ops, mpl3115_suspend,
+                               mpl3115_resume);
 
 static const struct i2c_device_id mpl3115_id[] = {
        { "mpl3115", 0 },
        .driver = {
                .name   = "mpl3115",
                .of_match_table = mpl3115_of_match,
-               .pm     = MPL3115_PM_OPS,
+               .pm     = pm_sleep_ptr(&mpl3115_pm_ops),
        },
        .probe = mpl3115_probe,
        .remove = mpl3115_remove,