]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
watchdog: rti: of: honor timeout-sec property
authorAlexander Sverdlin <alexander.sverdlin@siemens.com>
Thu, 7 Nov 2024 20:38:28 +0000 (21:38 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 14 Dec 2024 18:51:31 +0000 (19:51 +0100)
commitfb17d710c7a4f75ce394b4bbfc7ccbbf37ab52e2
treeb3343c801367d3523d1f8aa6246aafb39c09d781
parent2ed3e3a3ac06af8a6391c3d6a7791b7967d7d43a
watchdog: rti: of: honor timeout-sec property

commit 4962ee045d8f06638714d801ab0fb72f89c16690 upstream.

Currently "timeout-sec" Device Tree property is being silently ignored:
even though watchdog_init_timeout() is being used, the driver always passes
"heartbeat" == DEFAULT_HEARTBEAT == 60 as argument.

Fix this by setting struct watchdog_device::timeout to DEFAULT_HEARTBEAT
and passing real module parameter value to watchdog_init_timeout() (which
may now be 0 if not specified).

Cc: stable@vger.kernel.org
Fixes: 2d63908bdbfb ("watchdog: Add K3 RTI watchdog support")
Signed-off-by: Alexander Sverdlin <alexander.sverdlin@siemens.com>
Reviewed-by: Vignesh Raghavendra <vigneshr@ti.com>
Reviewed-by: Guenter Roeck <linux@roeck-us.net>
Link: https://lore.kernel.org/r/20241107203830.1068456-1-alexander.sverdlin@siemens.com
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
Signed-off-by: Wim Van Sebroeck <wim@linux-watchdog.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/watchdog/rti_wdt.c