]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
watchdog: coh901327: add COMMON_CLK dependency
authorArnd Bergmann <arnd@arndb.de>
Thu, 3 Dec 2020 22:33:42 +0000 (23:33 +0100)
committerWim Van Sebroeck <wim@linux-watchdog.org>
Thu, 17 Dec 2020 05:46:26 +0000 (06:46 +0100)
clang produces a build failure in configurations without COMMON_CLK
when a timeout calculation goes wrong:

arm-linux-gnueabi-ld: drivers/watchdog/coh901327_wdt.o: in function `coh901327_enable':
coh901327_wdt.c:(.text+0x50): undefined reference to `__bad_udelay'

Add a Kconfig dependency to only do build testing when COMMON_CLK
is enabled.

Fixes: da2a68b3eb47 ("watchdog: Enable COMPILE_TEST where possible")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Reviewed-by: Guenter Roeck <linux@roeck-us.net>
Link: https://lore.kernel.org/r/20201203223358.1269372-1-arnd@kernel.org
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
Signed-off-by: Wim Van Sebroeck <wim@linux-watchdog.org>
drivers/watchdog/Kconfig

index 5d3c3ec918a80780a4b891906e5ae09a141a25cd..60f2b9a4a5668bbc70c0ea46e82d50bfefdd915f 100644 (file)
@@ -632,7 +632,7 @@ config SUNXI_WATCHDOG
 
 config COH901327_WATCHDOG
        bool "ST-Ericsson COH 901 327 watchdog"
-       depends on ARCH_U300 || (ARM && COMPILE_TEST)
+       depends on ARCH_U300 || (ARM && COMMON_CLK && COMPILE_TEST)
        default y if MACH_U300
        select WATCHDOG_CORE
        help