• Arnd Bergmann's avatar
    Input: spear-keyboard - use __maybe_unused to hide pm functions · 7ffae990
    Arnd Bergmann authored
    The spear keyboard driver uses #ifdef CONFIG_PM to hide its
    power management functions, but then uses references from
    SIMPLE_DEV_PM_OPS that are only present if both CONFIG_PM
    and CONFIG_PM_SLEEP are set, resulting in a warning about unused
    functions:
    
    drivers/input/keyboard/spear-keyboard.c:292:12: error: 'spear_kbd_suspend' defined but not used [-Werror=unused-function]
    drivers/input/keyboard/spear-keyboard.c:345:12: error: 'spear_kbd_resume' defined but not used [-Werror=unused-function]
    
    This removes the #ifdef and instead uses a __maybe_unused
    annotation.
    Signed-off-by: default avatarArnd Bergmann <arnd@arndb.de>
    Signed-off-by: default avatarDmitry Torokhov <dmitry.torokhov@gmail.com>
    7ffae990
spear-keyboard.c 9.3 KB