aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/input
diff options
context:
space:
mode:
authorNuno Sá <nuno.sa@analog.com>2022-08-30 21:15:03 -0700
committerDmitry Torokhov <dmitry.torokhov@gmail.com>2022-08-30 21:16:35 -0700
commit4f35adaee07d182a4a7ef6b960c614ff3c5b4090 (patch)
tree29c522566601f9b5b0bea93e4e5fc2c1c0dafbf8 /drivers/input
parentInput: adp5588-keys - add regulator support (diff)
downloadlinux-dev-4f35adaee07d182a4a7ef6b960c614ff3c5b4090.tar.xz
linux-dev-4f35adaee07d182a4a7ef6b960c614ff3c5b4090.zip
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: Nuno Sá <nuno.sa@analog.com> Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com> Link: https://lore.kernel.org/r/20220829131553.690063-11-nuno.sa@analog.com Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Diffstat (limited to 'drivers/input')
-rw-r--r--drivers/input/keyboard/adp5588-keys.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/input/keyboard/adp5588-keys.c b/drivers/input/keyboard/adp5588-keys.c
index 1db6b28db7ba..7cd83c8e7110 100644
--- a/drivers/input/keyboard/adp5588-keys.c
+++ b/drivers/input/keyboard/adp5588-keys.c
@@ -827,7 +827,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);
@@ -836,7 +836,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);
@@ -845,7 +845,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 },
@@ -865,7 +865,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,