return 0;
 }
 
-#ifdef CONFIG_PM_SLEEP
 static int tmp102_suspend(struct device *dev)
 {
        struct i2c_client *client = to_i2c_client(dev);
 
        return err;
 }
-#endif /* CONFIG_PM */
 
-static SIMPLE_DEV_PM_OPS(tmp102_dev_pm_ops, tmp102_suspend, tmp102_resume);
+static DEFINE_SIMPLE_DEV_PM_OPS(tmp102_dev_pm_ops, tmp102_suspend, tmp102_resume);
 
 static const struct i2c_device_id tmp102_id[] = {
        { "tmp102", 0 },
 static struct i2c_driver tmp102_driver = {
        .driver.name    = DRIVER_NAME,
        .driver.of_match_table = of_match_ptr(tmp102_of_match),
-       .driver.pm      = &tmp102_dev_pm_ops,
+       .driver.pm      = pm_sleep_ptr(&tmp102_dev_pm_ops),
        .probe_new      = tmp102_probe,
        .id_table       = tmp102_id,
 };