diff mbox series

watchdog: rave-sp: add NVMEM dependency

Message ID 20180115161052.684821-1-arnd@arndb.de
State New
Headers show
Series watchdog: rave-sp: add NVMEM dependency | expand

Commit Message

Arnd Bergmann Jan. 15, 2018, 4:10 p.m. UTC
We can build this driver with or without NVMEM, but not built-in
when NVMEM is a loadable module:

drivers/watchdog/rave-sp-wdt.o: In function `rave_sp_wdt_probe':
rave-sp-wdt.c:(.text+0x27c): undefined reference to `nvmem_cell_get'
rave-sp-wdt.c:(.text+0x290): undefined reference to `nvmem_cell_read'
rave-sp-wdt.c:(.text+0x2c4): undefined reference to `nvmem_cell_put'

This adds a Kconfig dependency to enforce that.

Fixes: c3bb33345721 ("watchdog: Add RAVE SP watchdog driver")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>

---
 drivers/watchdog/Kconfig | 1 +
 1 file changed, 1 insertion(+)

-- 
2.9.0

--
To unsubscribe from this list: send the line "unsubscribe linux-watchdog" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Comments

Guenter Roeck Jan. 15, 2018, 6 p.m. UTC | #1
On 01/15/2018 08:10 AM, Arnd Bergmann wrote:
> We can build this driver with or without NVMEM, but not built-in

> when NVMEM is a loadable module:

> 

> drivers/watchdog/rave-sp-wdt.o: In function `rave_sp_wdt_probe':

> rave-sp-wdt.c:(.text+0x27c): undefined reference to `nvmem_cell_get'

> rave-sp-wdt.c:(.text+0x290): undefined reference to `nvmem_cell_read'

> rave-sp-wdt.c:(.text+0x2c4): undefined reference to `nvmem_cell_put'

> 

> This adds a Kconfig dependency to enforce that.

> 

> Fixes: c3bb33345721 ("watchdog: Add RAVE SP watchdog driver")

> Signed-off-by: Arnd Bergmann <arnd@arndb.de>


Reviewed-by: Guenter Roeck <linux@roeck-us.net>


> ---

>   drivers/watchdog/Kconfig | 1 +

>   1 file changed, 1 insertion(+)

> 

> diff --git a/drivers/watchdog/Kconfig b/drivers/watchdog/Kconfig

> index 34d1c6851fa7..c09369f80989 100644

> --- a/drivers/watchdog/Kconfig

> +++ b/drivers/watchdog/Kconfig

> @@ -226,6 +226,7 @@ config ZIIRAVE_WATCHDOG

>   config RAVE_SP_WATCHDOG

>   	tristate "RAVE SP Watchdog timer"

>   	depends on RAVE_SP_CORE

> +	depends on NVMEM || !NVMEM

>   	select WATCHDOG_CORE

>   	help

>   	  Support for the watchdog on RAVE SP device.

> 


--
To unsubscribe from this list: send the line "unsubscribe linux-watchdog" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox series

Patch

diff --git a/drivers/watchdog/Kconfig b/drivers/watchdog/Kconfig
index 34d1c6851fa7..c09369f80989 100644
--- a/drivers/watchdog/Kconfig
+++ b/drivers/watchdog/Kconfig
@@ -226,6 +226,7 @@  config ZIIRAVE_WATCHDOG
 config RAVE_SP_WATCHDOG
 	tristate "RAVE SP Watchdog timer"
 	depends on RAVE_SP_CORE
+	depends on NVMEM || !NVMEM
 	select WATCHDOG_CORE
 	help
 	  Support for the watchdog on RAVE SP device.