• Arnd Bergmann's avatar
    Input: ektf2127 - mark PM functions as __maybe_unused · 979987de
    Arnd Bergmann authored
    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: 9ca5bf50 ("Input: add support for Elan eKTF2127 touchscreen controller")
    Signed-off-by: default avatarArnd Bergmann <arnd@arndb.de>
    Signed-off-by: default avatarDmitry Torokhov <dmitry.torokhov@gmail.com>
    979987de
ektf2127.c 8.09 KB