Re: AT91SAM9/CAP9 watchdog driver

From: Andrew Victor
Date: Wed Jun 04 2008 - 14:36:20 EST


hi Alan,

>> Since the watchdog registers are Write-Once, if the user does not
>> specify a "wdt_timeout" parameter we'd still like the driver to load
>> even if it's not enabled.
>
> Surely you can avoid doing the register writes until after you check the
> validity of arguments ?

The validity of the timeout value is checked in at91_wdt_settimeout().
It returns -EINVAL if the timeout value is invalid.

The issue above is rather that probe() should not fail if
at91_wdt_settimeout() returns -EINVAL, since we'd like the
driver/module to still load to allow the user to later specify a valid
timeout via ioctl(WDIOC_SETTIMEOUT).


Regards,
Andrew Victor
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/