aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/power
diff options
context:
space:
mode:
authorArnd Bergmann <arnd@arndb.de>2016-03-02 16:58:56 +0100
committerSebastian Reichel <sre@kernel.org>2016-03-03 15:12:08 +0100
commit0df6e32b0e36710fe989095241833e09dac3e41d (patch)
treedc560d925ad1d48ed283886b3c6c748d9cb5dd03 /include/linux/power
parentpower: ipaq-micro-battery: use __maybe_unused to hide pm functions (diff)
downloadlinux-dev-0df6e32b0e36710fe989095241833e09dac3e41d.tar.xz
linux-dev-0df6e32b0e36710fe989095241833e09dac3e41d.zip
power: pm2301-charger: use __maybe_unused to hide pm functions
The pm2301 charger driver uses nested #ifdefs to check for both CONFIG_PM and CONFIG_PM_SLEEP in an attempt to hide its suspend and runtime-pm operations when they are unused, but it does not hide the clear_lpn_pin() function in the same way, so we get a build warning when everything is disabled: drivers/power/pm2301_charger.c:123:13: error: 'clear_lpn_pin' defined but not used [-Werror=unused-function] This removes all the #ifdef and instead uses __maybe_unused annotations to let the compiler know it can silently drop the function definition. For the PM2XXX_PM_OPS, we can use an IS_ENABLED() check to avoid defining the structure when CONFIG_PM is not set without the #ifdef. Signed-off-by: Arnd Bergmann <arnd@arndb.de> Signed-off-by: Sebastian Reichel <sre@kernel.org>
Diffstat (limited to 'include/linux/power')
0 files changed, 0 insertions, 0 deletions