return max17042_probe(i2c, dev, irq, id->driver_data);
}
-#ifdef CONFIG_PM_SLEEP
static int max17042_suspend(struct device *dev)
{
struct max17042_chip *chip = dev_get_drvdata(dev);
return 0;
}
-#endif
-static SIMPLE_DEV_PM_OPS(max17042_pm_ops, max17042_suspend,
- max17042_resume);
+static DEFINE_SIMPLE_DEV_PM_OPS(max17042_pm_ops, max17042_suspend,
+ max17042_resume);
#ifdef CONFIG_ACPI
static const struct acpi_device_id max17042_acpi_match[] = {
.name = "max17042",
.acpi_match_table = ACPI_PTR(max17042_acpi_match),
.of_match_table = of_match_ptr(max17042_dt_match),
- .pm = &max17042_pm_ops,
+ .pm = pm_ptr(&max17042_pm_ops),
},
.probe = max17042_i2c_probe,
.id_table = max17042_id,
.driver = {
.name = "max17042",
.acpi_match_table = ACPI_PTR(max17042_acpi_match),
- .pm = &max17042_pm_ops,
+ .pm = pm_ptr(&max17042_pm_ops),
},
.probe = max17042_platform_probe,
.id_table = max17042_platform_id,