Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

clocksource/drivers/imx-tpm: Move tpm_read_sched_clock() under CONFIG_ARM

When building this driver for an architecture other than ARCH=arm:

drivers/clocksource/timer-imx-tpm.c:78:20: error: unused function 'tpm_read_sched_clock' [-Werror,-Wunused-function]
static u64 notrace tpm_read_sched_clock(void)
^
1 error generated.

Move the function definition under the existing CONFIG_ARM section so
there is no more warning.

Fixes: 10720e120e2b ("clocksource/drivers/imx-tpm: Exclude sched clock for ARM64")
Signed-off-by: Nathan Chancellor <nathan@kernel.org>
Reviewed-by: Peng Fan <peng.fan@nxp.com>
Link: https://lore.kernel.org/r/20220303184212.2356245-1-nathan@kernel.org
Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>

authored by

Nathan Chancellor and committed by
Daniel Lezcano
bf127df3 8c4b810a

+1 -1
+1 -1
drivers/clocksource/timer-imx-tpm.c
··· 73 73 { 74 74 return tpm_read_counter(); 75 75 } 76 - #endif 77 76 78 77 static u64 notrace tpm_read_sched_clock(void) 79 78 { 80 79 return tpm_read_counter(); 81 80 } 81 + #endif 82 82 83 83 static int tpm_set_next_event(unsigned long delta, 84 84 struct clock_event_device *evt)