Skip to contentSkip to conversation

watchdog: rave-sp: add NVMEM dependency

PATCH In review Arnd Bergmann 2 participants 2 messages Jan 15, 2018 Watchdog device drivers

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 watchdog: rave-sp: add NVMEM dependency

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")
---
 drivers/watchdog/Kconfig | 1 +
 1 file changed, 1 insertion(+)
drivers/watchdog/Kconfig +1 -0
index 34d1c6851fa7..c09369f80989 100644
@@ -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.
Signature · 1 line
2.9.0
maintainer Reviewed-by on v1 1/1
#1 lore raw
Quoted 8 lines · Arnd Bergmann

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'

Quoted 4 lines

This adds a Kconfig dependency to enforce that.

Fixes c3bb33345721 ("watchdog: Add RAVE SP watchdog driver")
Quoted 17 lines
---
  drivers/watchdog/Kconfig | 1 +
  1 file changed, 1 insertion(+)
drivers/watchdog/Kconfig +1 -0
index 34d1c6851fa7..c09369f80989 100644
@@ -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.