]> git.baikalelectronics.ru Git - kernel.git/commit
mfd: as3722: Mark PM functions as __maybe_unused
authorArnd Bergmann <arnd@arndb.de>
Tue, 8 Dec 2015 15:21:05 +0000 (16:21 +0100)
committerLee Jones <lee.jones@linaro.org>
Mon, 11 Jan 2016 06:23:43 +0000 (06:23 +0000)
commitdb6d945c298b743e07c17c0f7e1b4482d7b93725
tree78dda956d6528f929caac71e65747a8f7c0c3c51
parent59c8bce03544df040ce5776fb085826db2265c55
mfd: as3722: Mark PM functions as __maybe_unused

The newly introduced as3722_i2c_suspend/resume functions are built
unconditionally, but only used when power management is enabled,
so we get a warning otherwise:

drivers/mfd/as3722.c:427:12: warning: 'as3722_i2c_suspend' defined but not used [-Wunused-function]
drivers/mfd/as3722.c:438:12: warning: 'as3722_i2c_resume' defined but not used [-Wunused-function]

This marks them both as __maybe_unused, which avoids an ugly #ifdef
and gives us best compile-time coverage. When they are unused, the
compiler will silently drop the functions from its output.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Fixes: e725fea32421 ("mfd: as3722: Handle interrupts on suspend")
Signed-off-by: Lee Jones <lee.jones@linaro.org>
drivers/mfd/as3722.c