diff options
author | Arnd Bergmann <arnd@arndb.de> | 2016-09-30 18:36:54 -0400 |
---|---|---|
committer | Dmitry Torokhov <dmitry.torokhov@gmail.com> | 2016-10-03 19:36:52 -0400 |
commit | 979987ded3a5ae1fb60ef751bdf185c502d70590 (patch) | |
tree | 09411aa15e0a68a4a027ee2de2cf37a8c66a9376 /drivers/input | |
parent | d095c500fd79421f915cea26925677cd16ecd623 (diff) |
Input: ektf2127 - mark PM functions as __maybe_unused
The newly added ektf2127 driver uses the SIMPLE_DEV_PM_OPS macro
to conditionally refer to the resume/suspend functions, which
causes a warning when CONFIG_PM_SLEEP is disabled:
drivers/input/touchscreen/ektf2127.c:168:12: error: 'ektf2127_resume' defined but not used [-Werror=unused-function]
drivers/input/touchscreen/ektf2127.c:156:12: error: 'ektf2127_suspend' defined but not used [-Werror=unused-function]
We could either put these functions inside of an #ifdef or
add __maybe_unused annotations. This uses the second approach,
which is generally more foolproof.
Fixes: 9ca5bf5029b6 ("Input: add support for Elan eKTF2127 touchscreen controller")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Diffstat (limited to 'drivers/input')
-rw-r--r-- | drivers/input/touchscreen/ektf2127.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/input/touchscreen/ektf2127.c b/drivers/input/touchscreen/ektf2127.c index 31a2dd7f38aa..0ed34ff787ce 100644 --- a/drivers/input/touchscreen/ektf2127.c +++ b/drivers/input/touchscreen/ektf2127.c | |||
@@ -153,7 +153,7 @@ static void ektf2127_stop(struct input_dev *dev) | |||
153 | gpiod_set_value_cansleep(ts->power_gpios, 0); | 153 | gpiod_set_value_cansleep(ts->power_gpios, 0); |
154 | } | 154 | } |
155 | 155 | ||
156 | static int ektf2127_suspend(struct device *dev) | 156 | static int __maybe_unused ektf2127_suspend(struct device *dev) |
157 | { | 157 | { |
158 | struct ektf2127_ts *ts = i2c_get_clientdata(to_i2c_client(dev)); | 158 | struct ektf2127_ts *ts = i2c_get_clientdata(to_i2c_client(dev)); |
159 | 159 | ||
@@ -165,7 +165,7 @@ static int ektf2127_suspend(struct device *dev) | |||
165 | return 0; | 165 | return 0; |
166 | } | 166 | } |
167 | 167 | ||
168 | static int ektf2127_resume(struct device *dev) | 168 | static int __maybe_unused ektf2127_resume(struct device *dev) |
169 | { | 169 | { |
170 | struct ektf2127_ts *ts = i2c_get_clientdata(to_i2c_client(dev)); | 170 | struct ektf2127_ts *ts = i2c_get_clientdata(to_i2c_client(dev)); |
171 | 171 | ||