mfd: arizona: Remove #ifdef guards for PM related functions
authorPaul Cercueil <paul@crapouillou.net>
Sun, 23 Oct 2022 09:48:43 +0000 (10:48 +0100)
committerLee Jones <lee@kernel.org>
Wed, 7 Dec 2022 13:28:12 +0000 (13:28 +0000)
commit50d3ac7d3ce472801c4c0b3f8705b943657a6552
treeb081622748591f1134f13613a81145df1ebf6d02
parentdaf7ea817fda9e5094082a1dd99227001f7ef861
mfd: arizona: Remove #ifdef guards for PM related functions

Only export the arizona_pm_ops if CONFIG_PM is set, but leave the
suspend/resume functions (and related code) outside #ifdef guards.

If CONFIG_PM is not set, the arizona_pm_ops will be defined as
"static __maybe_unused", and the structure plus all the callbacks will
be automatically dropped by the compiler.

This has the advantage of always compiling these functions in,
independently of any Kconfig option. Thanks to that, bugs and other
regressions are subsequently easier to catch.

Signed-off-by: Paul Cercueil <paul@crapouillou.net>
Acked-by: Charles Keepax <ckeepax@opensource.cirrus.com>
Signed-off-by: Lee Jones <lee@kernel.org>
drivers/mfd/arizona-core.c
drivers/mfd/arizona-i2c.c
drivers/mfd/arizona-spi.c