Re: [PATCH v2] watchdog: Convert jz4740_wdt driver to watchdog core

From: Wolfram Sang
Date: Tue Jan 24 2012 - 14:47:10 EST



On Tue, Jan 24, 2012 at 10:21:45AM +0800, Axel Lin wrote:
> This patch converts jz4740_wdt driver to use watchdog core APIs.
> Also use devm_* APIs to save a few error handling code.
>
> Signed-off-by: Axel Lin <axel.lin@xxxxxxxxx>
> Acked-by: Paul Cercueil <paul@xxxxxxxxxxxxxxx>
> ---
> v2: Address all the comments by Wolfram.
> - Remove unneeded 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 unneeded pointer check for drvdata->mem

The code still has those:

41 #define WDT_IN_USE 0
42 #define WDT_OK_TO_CLOSE 1

> +struct jz4740_wdt_drvdata {
> + struct watchdog_device wdt;
> + void __iomem *base;
> + struct resource *mem;

mem can go, too.

> + struct clk *rtc_clk;
> +};

Rest looks fine.

Thanks,

Wolfram

--
Pengutronix e.K. | Wolfram Sang |
Industrial Linux Solutions | http://www.pengutronix.de/ |

Attachment: signature.asc
Description: Digital signature