]> git.baikalelectronics.ru Git - kernel.git/commit
ARM: imx: provide v7_cpu_resume() only on ARM_CPU_SUSPEND=y
authorAhmad Fatoum <a.fatoum@pengutronix.de>
Mon, 23 Mar 2020 08:19:33 +0000 (09:19 +0100)
committerArnd Bergmann <arnd@arndb.de>
Fri, 17 Apr 2020 14:29:59 +0000 (16:29 +0200)
commitc49dd98d65272ecc764898d07ab8661444bb60dd
treefee0f5ceface9fe8e4d991cea3b346b20cc579ab
parent0e6c92ce1d170795a396f8108369eb2c8412797f
ARM: imx: provide v7_cpu_resume() only on ARM_CPU_SUSPEND=y

9a7384b0d287 ("ARM: imx: build v7_cpu_resume() unconditionally")
introduced an unintended linker error for i.MX6 configurations that have
ARM_CPU_SUSPEND=n which can happen if neither CONFIG_PM, CONFIG_CPU_IDLE,
nor ARM_PSCI_FW are selected.

Fix this by having v7_cpu_resume() compiled only when cpu_resume() it
calls is available as well.

The C declaration for the function remains unguarded to avoid future code
inadvertently using a stub and introducing a regression to the bug the
original commit fixed.

Cc: <stable@vger.kernel.org>
Fixes: 9a7384b0d287 ("ARM: imx: build v7_cpu_resume() unconditionally")
Reported-by: Clemens Gruber <clemens.gruber@pqgruber.com>
Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
Tested-by: Roland Hieber <rhi@pengutronix.de>
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
arch/arm/mach-imx/Makefile