Commit 4f35adae authored by Nuno Sá's avatar Nuno Sá Committed by Dmitry Torokhov

Input: adp5588-keys - use new PM macros

With the new PM macros (DEFINE_SIMPLE_DEV_PM_OPS() and pm_sleep_ptr()), the
compiler has visibility to see that the functions are not used when
!CONFIG_PM and hence, remove the dead code. As such, there's no need
for '__maybe_unused'.
Signed-off-by: default avatarNuno Sá <nuno.sa@analog.com>
Reviewed-by: default avatarAndy Shevchenko <andy.shevchenko@gmail.com>
Link: https://lore.kernel.org/r/20220829131553.690063-11-nuno.sa@analog.comSigned-off-by: default avatarDmitry Torokhov <dmitry.torokhov@gmail.com>
parent 73d4a542
...@@ -827,7 +827,7 @@ static void adp5588_remove(struct i2c_client *client) ...@@ -827,7 +827,7 @@ static void adp5588_remove(struct i2c_client *client)
/* all resources will be freed by devm */ /* 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); struct i2c_client *client = to_i2c_client(dev);
...@@ -836,7 +836,7 @@ static int __maybe_unused adp5588_suspend(struct device *dev) ...@@ -836,7 +836,7 @@ static int __maybe_unused adp5588_suspend(struct device *dev)
return 0; 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); struct i2c_client *client = to_i2c_client(dev);
...@@ -845,7 +845,7 @@ static int __maybe_unused adp5588_resume(struct device *dev) ...@@ -845,7 +845,7 @@ static int __maybe_unused adp5588_resume(struct device *dev)
return 0; 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[] = { static const struct i2c_device_id adp5588_id[] = {
{ "adp5588-keys", 0 }, { "adp5588-keys", 0 },
...@@ -865,7 +865,7 @@ static struct i2c_driver adp5588_driver = { ...@@ -865,7 +865,7 @@ static struct i2c_driver adp5588_driver = {
.driver = { .driver = {
.name = KBUILD_MODNAME, .name = KBUILD_MODNAME,
.of_match_table = adp5588_of_match, .of_match_table = adp5588_of_match,
.pm = &adp5588_dev_pm_ops, .pm = pm_sleep_ptr(&adp5588_dev_pm_ops),
}, },
.probe = adp5588_probe, .probe = adp5588_probe,
.remove = adp5588_remove, .remove = adp5588_remove,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment