aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJonathan Cameron <Jonathan.Cameron@huawei.com>2022-12-22 20:06:26 +0000
committerJonathan Cameron <Jonathan.Cameron@huawei.com>2022-12-28 17:29:24 +0000
commit69b79f43e553e9969d98842db19c88e88d7ba94d (patch)
treefa80700ad5baaf9b582d3e7dd6b70e5e82325bc2
parent3b5b1bb7439794dbf291d20be956189088fd1ac0 (diff)
downloadiio-69b79f43e553e9969d98842db19c88e88d7ba94d.tar.gz
Input: eeti_ts - switch to DEFINE_SIMPLE_DEV_PM_OPS() and pm_sleep_ptr()
SIMPLE_DEV_PM_OPS() is deprecated as it requires explicit protection against unused function warnings. The new combination of pm_sleep_ptr() and DEFINE_SIMPLE_DEV_PM_OPS() allows the compiler to see the functions, thus suppressing the warning, but still allowing the unused code to be removed. Thus also drop the __maybe_unused markings. Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com> Cc: Daniel Mack <daniel@zonque.org>
-rw-r--r--drivers/input/touchscreen/eeti_ts.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/input/touchscreen/eeti_ts.c b/drivers/input/touchscreen/eeti_ts.c
index c8ab03f492274..56fa21688bdb2 100644
--- a/drivers/input/touchscreen/eeti_ts.c
+++ b/drivers/input/touchscreen/eeti_ts.c
@@ -232,7 +232,7 @@ static int eeti_ts_probe(struct i2c_client *client)
return 0;
}
-static int __maybe_unused eeti_ts_suspend(struct device *dev)
+static int eeti_ts_suspend(struct device *dev)
{
struct i2c_client *client = to_i2c_client(dev);
struct eeti_ts *eeti = i2c_get_clientdata(client);
@@ -251,7 +251,7 @@ static int __maybe_unused eeti_ts_suspend(struct device *dev)
return 0;
}
-static int __maybe_unused eeti_ts_resume(struct device *dev)
+static int eeti_ts_resume(struct device *dev)
{
struct i2c_client *client = to_i2c_client(dev);
struct eeti_ts *eeti = i2c_get_clientdata(client);
@@ -270,7 +270,7 @@ static int __maybe_unused eeti_ts_resume(struct device *dev)
return 0;
}
-static SIMPLE_DEV_PM_OPS(eeti_ts_pm, eeti_ts_suspend, eeti_ts_resume);
+static DEFINE_SIMPLE_DEV_PM_OPS(eeti_ts_pm, eeti_ts_suspend, eeti_ts_resume);
static const struct i2c_device_id eeti_ts_id[] = {
{ "eeti_ts", 0 },
@@ -288,7 +288,7 @@ static const struct of_device_id of_eeti_ts_match[] = {
static struct i2c_driver eeti_ts_driver = {
.driver = {
.name = "eeti_ts",
- .pm = &eeti_ts_pm,
+ .pm = pm_sleep_ptr(&eeti_ts_pm),
.of_match_table = of_match_ptr(of_eeti_ts_match),
},
.probe_new = eeti_ts_probe,