]> git.baikalelectronics.ru Git - kernel.git/commit
Input: ektf2127 - mark PM functions as __maybe_unused
authorArnd Bergmann <arnd@arndb.de>
Fri, 30 Sep 2016 22:36:54 +0000 (15:36 -0700)
committerDmitry Torokhov <dmitry.torokhov@gmail.com>
Mon, 3 Oct 2016 23:36:52 +0000 (16:36 -0700)
commit7acee63035b59d83d679111411167cf21b4dd807
tree09411aa15e0a68a4a027ee2de2cf37a8c66a9376
parente04619f4e93b1bf5cb9edc96730621b6b76934d8
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: 7e52038a05bd ("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>
drivers/input/touchscreen/ektf2127.c