Skip to contentSkip to conversation

watchdog: Convert jz4740_wdt driver to watchdog core

PATCH In review Axel Lin 2 participants 2 messages Jan 26, 2012 – Jan 28, 2012

Subsystems (2)
lore
Share & tools
lore

Axel Lin

author
#0 lore raw

PATCH v3 1/1 watchdog: Convert jz4740_wdt driver to watchdog core

This patch converts jz4740_wdt driver to use watchdog core APIs. Also use devm_* APIs to save a few error handling code.

---
v3: - Remove unused define for WDT_IN_USE and WDT_OK_TO_CLOSE
- Remove mem from struct jz4740_wdt_drvdata

v2: Address all the comments by Wolfram.
- Remove unneed header file inclusion
- Drop 'heartbeat' usage in jz4740_wdt_set_heartbeat and jz4740_wdt_start
- Init wdt_dev->timeout in probe using the global 'heartbeat'
- Remove unneed pointer check for drvdata->mem

 drivers/watchdog/Kconfig      |    1 +
 drivers/watchdog/jz4740_wdt.c |  257 +++++++++++++----------------------------
 2 files changed, 84 insertions(+), 174 deletions(-)
drivers/watchdog/Kconfig +1 -0
index 2c89da6..a297f01 100644
@@ -965,6 +965,7 @@ config INDYDOG
 config JZ4740_WDT
 	tristate "Ingenic jz4740 SoC hardware watchdog"
 	depends on MACH_JZ4740
+	select WATCHDOG_CORE
 	help
 	  Hardware driver for the built-in watchdog timer on Ingenic jz4740 SoCs.
 
drivers/watchdog/jz4740_wdt.c +83 -174

354 lines not on this page · raw message

Signature · 1 line
1.7.5.4
Reviewed-by on v3 1/1
#1 lore raw
Quoted 9 lines · Axel Lin

This patch converts jz4740_wdt driver to use watchdog core APIs. Also use devm_* APIs to save a few error handling code.

---
v3: - Remove unused define for WDT_IN_USE and WDT_OK_TO_CLOSE
- Remove mem from struct jz4740_wdt_drvdata

Quoted 5 lines

v2: Address all the comments by Wolfram.
- Remove unneed header file inclusion
- Drop 'heartbeat' usage in jz4740_wdt_set_heartbeat and jz4740_wdt_start
- Init wdt_dev->timeout in probe using the global 'heartbeat'
- Remove unneed pointer check for drvdata->mem

Thanks!

Signature · 2 lines
Pengutronix e.K.                           | Wolfram Sang                |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |