i2c_unregister_device(chip->rtc);
}
-#ifdef CONFIG_PM_SLEEP
static int max8925_suspend(struct device *dev)
{
struct i2c_client *client = to_i2c_client(dev);
disable_irq_wake(chip->core_irq);
return 0;
}
-#endif
-static SIMPLE_DEV_PM_OPS(max8925_pm_ops, max8925_suspend, max8925_resume);
+static DEFINE_SIMPLE_DEV_PM_OPS(max8925_pm_ops,
+ max8925_suspend, max8925_resume);
static const struct of_device_id max8925_dt_ids[] = {
{ .compatible = "maxim,max8925", },
static struct i2c_driver max8925_driver = {
.driver = {
.name = "max8925",
- .pm = &max8925_pm_ops,
+ .pm = pm_sleep_ptr(&max8925_pm_ops),
.of_match_table = max8925_dt_ids,
},
.probe_new = max8925_probe,