1 MIPS: ath79: fix maximum timeout
3 If the userland tries to set a timeout higher than the max_timeout, then we should fallback to max_timeout.
5 Signed-off-by: John Crispin <blogic@openwrt.org>
7 Index: linux-3.8.13/drivers/watchdog/ath79_wdt.c
8 ===================================================================
9 --- linux-3.8.13.orig/drivers/watchdog/ath79_wdt.c 2013-07-14 14:10:19.198826462 +0200
10 +++ linux-3.8.13/drivers/watchdog/ath79_wdt.c 2013-07-14 14:25:40.810848422 +0200
13 static int ath79_wdt_set_timeout(int val)
15 - if (val < 1 || val > max_timeout)
20 + if (val > max_timeout)
21 + timeout = max_timeout;
25 ath79_wdt_keepalive();