]> git.ipfire.org Git - people/arne_f/kernel.git/commit
watchdog: imx2_wdt: Fix set_timeout for big timeout values
authorGeorg Hofmann <georg@hofmannsweb.com>
Mon, 8 Apr 2019 19:25:54 +0000 (21:25 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 15 Jun 2019 09:54:53 +0000 (11:54 +0200)
commitc3278ccc98ec21b9170a6bf222167dc46b282ec2
treed9159e0dc7916faa1957d3483174a4295c94f180
parent647fa64837dc02f8607883c535ed8fbf26cb9133
watchdog: imx2_wdt: Fix set_timeout for big timeout values

[ Upstream commit b07e228eee69601addba98b47b1a3850569e5013 ]

The documentated behavior is: if max_hw_heartbeat_ms is implemented, the
minimum of the set_timeout argument and max_hw_heartbeat_ms should be used.
This patch implements this behavior.
Previously only the first 7bits were used and the input argument was
returned.

Signed-off-by: Georg Hofmann <georg@hofmannsweb.com>
Reviewed-by: Guenter Roeck <linux@roeck-us.net>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
Signed-off-by: Wim Van Sebroeck <wim@linux-watchdog.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/watchdog/imx2_wdt.c