soc/tegra: pmc: fix #ifdef block in header
PATCH 1/1 soc/tegra: pmc: fix #ifdef block in header
From: Arnd Bergmann <[email protected]>
When build testing on ARM without the PMC driver, the other drivers fail to link:
ld.lld: error: undefined symbol: tegra_pmc_core_domain_state_synced
Quoted 4 lines
Quoted 4 lines
Quoted 4 lines
referenced by
regulators-tegra30.c
drivers/soc/tegra/regulators-tegra30.o:(tegra30_regulator_balance_voltage) in archive vmlinux.a
referenced byregulators-tegra20.c
drivers/soc/tegra/regulators-tegra20.o:(tegra20_core_rtc_update) in archive vmlinux.a
Adapt the checks in the header to cover both cases on other architectures and without PMC.
Fixes 8318af5dd29c ("soc/tegra: pmc: Move legacy code behind CONFIG_ARM guard")
Signed-off-by Arnd Bergmann <[email protected]>
--- include/soc/tegra/pmc.h | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-)
include/soc/tegra/pmc.h +4 -1
@@ -210,7 +210,6 @@ tegra_pmc_io_pad_power_disable(struct tegra_pmc *pmc, enum tegra_io_pad id)bool tegra_pmc_cpu_is_powered (unsigned int cpuid);int tegra_pmc_cpu_power_on (unsigned int cpuid);int tegra_pmc_cpu_remove_clamping (unsigned int cpuid); -bool tegra_pmc_core_domain_state_synced (void );#if defined(CONFIG_SOC_TEGRA_PMC ) && defined(CONFIG_PM_SLEEP )enum tegra_suspend_mode tegra_pmc_get_suspend_mode (void );
@@ -230,6 +229,10 @@ static inline void tegra_pmc_enter_suspend_mode(enum tegra_suspend_mode mode) { }#endif +#endif + +#if defined(CONFIG_ARM ) && defined(CONFIG_SOC_TEGRA_PMC ) +bool tegra_pmc_core_domain_state_synced (void );#else /* needed for COMPILE_TEST */ static inline bool tegra_pmc_core_domain_state_synced (void )
Signature · 1 line
2.39.5