Skip to content

Commit 979987d

Browse files
arndbdtor
authored andcommitted
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: 9ca5bf5 ("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>
1 parent d095c50 commit 979987d

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

drivers/input/touchscreen/ektf2127.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -153,7 +153,7 @@ static void ektf2127_stop(struct input_dev *dev)
153153
gpiod_set_value_cansleep(ts->power_gpios, 0);
154154
}
155155

156-
static int ektf2127_suspend(struct device *dev)
156+
static int __maybe_unused ektf2127_suspend(struct device *dev)
157157
{
158158
struct ektf2127_ts *ts = i2c_get_clientdata(to_i2c_client(dev));
159159

@@ -165,7 +165,7 @@ static int ektf2127_suspend(struct device *dev)
165165
return 0;
166166
}
167167

168-
static int ektf2127_resume(struct device *dev)
168+
static int __maybe_unused ektf2127_resume(struct device *dev)
169169
{
170170
struct ektf2127_ts *ts = i2c_get_clientdata(to_i2c_client(dev));
171171

0 commit comments

Comments
 (0)