提交 741b9c7d 编写于 作者: D Dmitry Artamonow 提交者: Wim Van Sebroeck

watchdog: fix GETTIMEOUT ioctl in booke_wdt

Commit dcfb7484 ([WATCHDOG] fix book E watchdog to take
WDIOC_SETTIMEOUT arg in seconds) fixed SETTIMEOUT ioctl
to use seconds as a parameter instead of some hardware-specific
"period", but missed to apply similar changes to GETTIMEOUT,
so it still returns "period" value. Let's fix it!
Also, while at it, make SETTIMEOUT ioctl return real timeout
value as it should do according to the documentation.
Signed-off-by: NDmitry Artamonow <mad_soft@inbox.ru>
Signed-off-by: NWim Van Sebroeck <wim@iguana.be>
上级 f599aaf0
......@@ -198,9 +198,13 @@ static long booke_wdt_ioctl(struct file *file,
booke_wdt_period = tmp;
#endif
booke_wdt_set();
return 0;
/* Fall */
case WDIOC_GETTIMEOUT:
#ifdef CONFIG_FSL_BOOKE
return put_user(period_to_sec(booke_wdt_period), p);
#else
return put_user(booke_wdt_period, p);
#endif
default:
return -ENOTTY;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册