Hi, On Mon, 2010-05-17 at 13:12 +0200, Palande Ameya (Nokia-D/Helsinki) wrote: > If we are not able to register then it is better to have watchdog in disabled > state than noticing a system reboot. > > Signed-off-by: Ameya Palande <ameya.palande@xxxxxxxxx> > --- > drivers/watchdog/twl4030_wdt.c | 2 ++ > 1 files changed, 2 insertions(+), 0 deletions(-) > > diff --git a/drivers/watchdog/twl4030_wdt.c b/drivers/watchdog/twl4030_wdt.c > index dcabe77..b5045ca 100644 > --- a/drivers/watchdog/twl4030_wdt.c > +++ b/drivers/watchdog/twl4030_wdt.c > @@ -190,6 +190,8 @@ static int __devinit twl4030_wdt_probe(struct platform_device *pdev) > > twl4030_wdt_dev = pdev; > > + twl4030_wdt_disable(wdt); > + > ret = misc_register(&wdt->miscdev); > if (ret) { > dev_err(wdt->miscdev.parent, It seems that in this patch, you disable the watchdog regardless whether the registration fails or not. I wonder if this is a good thing to do. What if the bootloader have already enabled the watchdog and then user space booting fails for some reason before any process is able to open and re-enable the watchdog? We could end up with a hung system that does not have the watchdog enabled. Maybe we should disable the watchdog only in case the registration actually fails? And even in that case, do we want to disable the watchdog? What are the situations where watchdog registration can fail? Is there a possibility that we would like to leave watchdog running in such case and cause a reboot (say, something bad happened before the watchdog module was loaded and the system ran out of memory, which causes watchdog registration to fail)? Maybe there is something I've missed, but this kind of questions came in my mind.. -Timo -- To unsubscribe from this list: send the line "unsubscribe linux-omap" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html