summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChris Packham <chris.packham@alliedtelesis.co.nz>2020-03-13 16:13:12 +1300
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2021-10-20 11:40:13 +0200
commit10b77e16b35bd58794d6b120b6f1534ec3f0e438 (patch)
tree0310436c865e1e45db694b7859d3f2005d34ca27
parent9acf1c10f1da058461855b2a42cd2c8662234b7c (diff)
watchdog: orion: use 0 for unset heartbeat
commit bb914088bd8a91c382f54d469367b2e5508b5493 upstream. If the heartbeat module param is not specified we would get an error message watchdog: f1020300.watchdog: driver supplied timeout (4294967295) out of range watchdog: f1020300.watchdog: falling back to default timeout (171) This is because we were initialising heartbeat to -1. By removing the initialisation (thus letting the C run time initialise it to 0) we silence the warning message and the default timeout is still used. Signed-off-by: Chris Packham <chris.packham@alliedtelesis.co.nz> Reviewed-by: Guenter Roeck <linux@roeck-us.net> Link: https://lore.kernel.org/r/20200313031312.1485-1-chris.packham@alliedtelesis.co.nz Signed-off-by: Guenter Roeck <linux@roeck-us.net> Signed-off-by: Wim Van Sebroeck <wim@linux-watchdog.org> Signed-off-by: Marek BehĂșn <kabel@kernel.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-rw-r--r--drivers/watchdog/orion_wdt.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/watchdog/orion_wdt.c b/drivers/watchdog/orion_wdt.c
index 8e6dfe76f9c9..4ddb4ea2e4a3 100644
--- a/drivers/watchdog/orion_wdt.c
+++ b/drivers/watchdog/orion_wdt.c
@@ -52,7 +52,7 @@
#define WDT_A370_RATIO (1 << WDT_A370_RATIO_SHIFT)
static bool nowayout = WATCHDOG_NOWAYOUT;
-static int heartbeat = -1; /* module parameter (seconds) */
+static int heartbeat; /* module parameter (seconds) */
struct orion_watchdog;