@@ -825,7 +825,7 @@ static void adp5588_remove(struct i2c_client *client)
/* all resources will be freed by devm */
}
-static int __maybe_unused adp5588_suspend(struct device *dev)
+static int adp5588_suspend(struct device *dev)
{
struct i2c_client *client = to_i2c_client(dev);
@@ -834,7 +834,7 @@ static int __maybe_unused adp5588_suspend(struct device *dev)
return 0;
}
-static int __maybe_unused adp5588_resume(struct device *dev)
+static int adp5588_resume(struct device *dev)
{
struct i2c_client *client = to_i2c_client(dev);
@@ -843,7 +843,7 @@ static int __maybe_unused adp5588_resume(struct device *dev)
return 0;
}
-static SIMPLE_DEV_PM_OPS(adp5588_dev_pm_ops, adp5588_suspend, adp5588_resume);
+static DEFINE_SIMPLE_DEV_PM_OPS(adp5588_dev_pm_ops, adp5588_suspend, adp5588_resume);
static const struct i2c_device_id adp5588_id[] = {
{ "adp5588-keys", 0 },
@@ -863,7 +863,7 @@ static struct i2c_driver adp5588_driver = {
.driver = {
.name = KBUILD_MODNAME,
.of_match_table = adp5588_of_match,
- .pm = &adp5588_dev_pm_ops,
+ .pm = pm_sleep_ptr(&adp5588_dev_pm_ops),
},
.probe = adp5588_probe,
.remove = adp5588_remove,