• Arnd Bergmann's avatar
    power: ipaq-micro-battery: use __maybe_unused to hide pm functions · 298cb0f1
    Arnd Bergmann authored
    The ipaq micro battery driver has suspend/resume functions that
    are accessed using SIMPLE_DEV_PM_OPS, which hide the reference
    when CONFIG_PM_SLEEP is not set, resulting in a warning about
    unused functions:
    
    drivers/power/ipaq_micro_battery.c:284:12: error: 'micro_batt_suspend' defined but not used [-Werror=unused-function]
    drivers/power/ipaq_micro_battery.c:292:12: error: 'micro_batt_resume' defined but not used [-Werror=unused-function]
    
    This adds __maybe_unused annotations to let the compiler know
    it can silently drop the function definition.
    Signed-off-by: default avatarArnd Bergmann <arnd@arndb.de>
    Signed-off-by: default avatarSebastian Reichel <sre@kernel.org>
    298cb0f1
ipaq_micro_battery.c 7.95 KB