On Wed, May 28, 2014 at 04:59:56PM +0200, Tord Andersson wrote: > When the current imx2 watchdog driver is used with the systemd watchdog feature, > we get "Failed to enable hardware watchdog: Inappropriate ioctl for device". > This is caused by missing ioctl setoptions to enable the watchdog. > This patch will add WDIOC_SETOPTIONS for WDIOS_ENABLECARD and WDIOS_DISABLECARD. > > Signed-off-by: Tord Andersson <tord.andersson@xxxxxxxxx> > --- Hi Tord, This driver is in the process of being concerted to use the watchdog core API. See 'watchdog: imx2_wdt: convert to watchdog core api' [1] from Anatolij Gustschin. With this update, this patch becomes unnecessary. Guenter [1] http://patchwork.roeck-us.net/patch/1340/ > drivers/watchdog/imx2_wdt.c | 11 +++++++++++ > 1 file changed, 11 insertions(+) > > diff --git a/drivers/watchdog/imx2_wdt.c b/drivers/watchdog/imx2_wdt.c > index dd51d95..180c6a5 100644 > --- a/drivers/watchdog/imx2_wdt.c > +++ b/drivers/watchdog/imx2_wdt.c > @@ -196,6 +196,17 @@ static long imx2_wdt_ioctl(struct file *file, unsigned int cmd, > new_value = val & IMX2_WDT_WRSR_TOUT ? WDIOF_CARDRESET : 0; > return put_user(new_value, p); > > + case WDIOC_SETOPTIONS: > + if (get_user(new_value, p)) > + return -EFAULT; > + if (new_value & WDIOS_ENABLECARD) > + imx2_wdt_start(); > + else if (new_value & WDIOS_DISABLECARD) > + imx2_wdt_stop(); > + else > + return -EINVAL; > + return 0; > + > case WDIOC_KEEPALIVE: > imx2_wdt_ping(); > return 0; > -- > 1.9.1 > > -- > To unsubscribe from this list: send the line "unsubscribe linux-watchdog" in > the body of a message to majordomo@xxxxxxxxxxxxxxx > More majordomo info at http://vger.kernel.org/majordomo-info.html > -- To unsubscribe from this list: send the line "unsubscribe linux-watchdog" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html