Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

Input: migor-ts - mark PM functions as __maybe_unused

The migor touchscreen driver is now available for COMPILE_TEST,
so we run into a harmless randconfig warning on ARM when CONFIG_PM
is disabled:

drivers/input/touchscreen/migor_ts.c:216:12: error: 'migor_ts_resume' defined but not used [-Werror=unused-function]
drivers/input/touchscreen/migor_ts.c:205:12: error: 'migor_ts_suspend' defined but not used [-Werror=unused-function]

This shuts up the warning by marking the two functions as __maybe_unused.
We could do the same thing by adding an #ifdef, but this version is
more reliable.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>

authored by

Arnd Bergmann and committed by
Dmitry Torokhov
c32feb03 14f935f9

+2 -2
+2 -2
drivers/input/touchscreen/migor_ts.c
··· 202 202 return 0; 203 203 } 204 204 205 - static int migor_ts_suspend(struct device *dev) 205 + static int __maybe_unused migor_ts_suspend(struct device *dev) 206 206 { 207 207 struct i2c_client *client = to_i2c_client(dev); 208 208 struct migor_ts_priv *priv = i2c_get_clientdata(client); ··· 213 213 return 0; 214 214 } 215 215 216 - static int migor_ts_resume(struct device *dev) 216 + static int __maybe_unused migor_ts_resume(struct device *dev) 217 217 { 218 218 struct i2c_client *client = to_i2c_client(dev); 219 219 struct migor_ts_priv *priv = i2c_get_clientdata(client);