[PATCH] clocksource: atmel_tcb: fix kconfig dependency

From: Arnd Bergmann
Date: Thu Feb 20 2025 - 03:52:46 EST


From: Arnd Bergmann <arnd@xxxxxxxx>

Build-testing this driver on arm without CONFIG_OF produces a warning:

drivers/clocksource/timer-atmel-tcb.c:368:34: error: 'atmel_tcb_of_match' defined but not used [-Werror=unused-const-variable=]
368 | static const struct of_device_id atmel_tcb_of_match[] = {
| ^~~~~~~~~~~~~~~~~~

Change the dependency to allow build-testing on all architectures but
instead require CONFIG_OF to be present.

Cc: Nicolas Ferre <nicolas.ferre@xxxxxxxxxxxxx>
Cc: Alexandre Belloni <alexandre.belloni@xxxxxxxxxxx>
Cc: Claudiu Beznea <claudiu.beznea@xxxxxxxxx>
Signed-off-by: Arnd Bergmann <arnd@xxxxxxxx>
---
I saw this for the first time today in a randconfig build, but I think this
has been around for a long time without ever showing up in random
configs.
---
drivers/clocksource/Kconfig | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/clocksource/Kconfig b/drivers/clocksource/Kconfig
index 468c882d9228..1dae9a5ce5d2 100644
--- a/drivers/clocksource/Kconfig
+++ b/drivers/clocksource/Kconfig
@@ -437,8 +437,8 @@ config ATMEL_ST

config ATMEL_TCB_CLKSRC
bool "Atmel TC Block timer driver" if COMPILE_TEST
- depends on ARM && HAS_IOMEM
- select TIMER_OF if OF
+ depends on OF && HAS_IOMEM
+ select TIMER_OF
help
Support for Timer Counter Blocks on Atmel SoCs.

--
2.39.5