]> git.ipfire.org Git - thirdparty/linux.git/commit
soc: qcom: spm: fix building with CONFIG_REGULATOR=n
authorArnd Bergmann <arnd@arndb.de>
Wed, 21 Feb 2024 15:44:51 +0000 (16:44 +0100)
committerBjorn Andersson <andersson@kernel.org>
Mon, 4 Mar 2024 03:54:47 +0000 (19:54 -0800)
commit26a526c25606495e7442feeea53061f81eca22be
treef53fd946ea052fca015548075b70e32f40c3257b
parentaa05f47474c02d38d88c32c633a551911c6fdc40
soc: qcom: spm: fix building with CONFIG_REGULATOR=n

The newly added code causes a build failure when -Werror is set:

drivers/soc/qcom/spm.c:388:12: error: 'spm_get_cpu' defined but not used [-Werror=unused-function]

Remove the #ifdef and instead use an IS_ENABLED() check that lets the
compiler perform dead code elimination instead of the preprocessor.

Fixes: 6496dba142f4 ("soc: qcom: spm: add support for voltage regulator")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Link: https://lore.kernel.org/r/20240221154457.2007420-1-arnd@kernel.org
Signed-off-by: Bjorn Andersson <andersson@kernel.org>
drivers/soc/qcom/spm.c