]> git.baikalelectronics.ru Git - kernel.git/commit
watchdog: orion: use 0 for unset heartbeat
authorChris Packham <chris.packham@alliedtelesis.co.nz>
Fri, 13 Mar 2020 03:13:12 +0000 (16:13 +1300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 20 Oct 2021 09:40:13 +0000 (11:40 +0200)
commit39fd63f6d17d9a0f8fe3d3b0eb7981ecf4010bc4
tree0310436c865e1e45db694b7859d3f2005d34ca27
parent0a5cdbad16b9f7db5764c4e98b12c0a7f1b8ff8d
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>
drivers/watchdog/orion_wdt.c