Re: [PATCH 7/8] watchdog: bcm2835: add CONFIG_OF dependency
From: Guenter Roeck
Date: Tue Feb 28 2017 - 17:06:23 EST
On Tue, Feb 28, 2017 at 10:01:22PM +0100, Arnd Bergmann wrote:
> Without CONFIG_OF, the driver fails to link:
>
> drivers/watchdog/built-in.o: In function `bcm2835_power_off':
> bcm2835_wdt.c:(.text+0x1946): undefined reference to `of_find_device_by_node'
>
> This adds a new dependency, to allow the COMPILE_TEST check to succeed.
>
> Fixes: da2a68b3eb47 ("watchdog: Enable COMPILE_TEST where possible")
> Signed-off-by: Arnd Bergmann <arnd@xxxxxxxx>
Reviewed-by: Guenter Roeck <linux@xxxxxxxxxxxx>
> ---
> drivers/watchdog/Kconfig | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/watchdog/Kconfig b/drivers/watchdog/Kconfig
> index 3216012170fa..8cb9b986ee2d 100644
> --- a/drivers/watchdog/Kconfig
> +++ b/drivers/watchdog/Kconfig
> @@ -1496,7 +1496,7 @@ config BCM63XX_WDT
>
> config BCM2835_WDT
> tristate "Broadcom BCM2835 hardware watchdog"
> - depends on ARCH_BCM2835 || COMPILE_TEST
> + depends on ARCH_BCM2835 || (OF && COMPILE_TEST)
> select WATCHDOG_CORE
> help
> Watchdog driver for the built in watchdog hardware in Broadcom
> --
> 2.9.0
>