aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/watchdog/f71808e_wdt.c
diff options
context:
space:
mode:
authorAhmad Fatoum <a.fatoum@pengutronix.de>2021-08-09 18:20:32 +0200
committerWim Van Sebroeck <wim@linux-watchdog.org>2021-10-26 21:31:03 +0200
commitbba6c477d52ea1da0c2cd13a57ca8f00508d2625 (patch)
tree79127e90db634013ece7c2b4c9826f5ac037178a /drivers/watchdog/f71808e_wdt.c
parentwatchdog: f71808e_wdt: fix inaccurate report in WDIOC_GETTIMEOUT (diff)
downloadlinux-dev-bba6c477d52ea1da0c2cd13a57ca8f00508d2625.tar.xz
linux-dev-bba6c477d52ea1da0c2cd13a57ca8f00508d2625.zip
watchdog: f71808e_wdt: remove superfluous global
max_timeout never served any purpose over WATCHDOG_MAX_TIMEOUT, which it was initialized with. Drop it. Suggested-by: Guenter Roeck <linux@roeck-us.net> Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de> Reviewed-by: Guenter Roeck <linux@roeck-us.net> Link: https://lore.kernel.org/r/d1f8cda90283855633537adee0af2c6b00a9ec25.1628525954.git-series.a.fatoum@pengutronix.de Signed-off-by: Guenter Roeck <linux@roeck-us.net> Signed-off-by: Wim Van Sebroeck <wim@linux-watchdog.org>
Diffstat (limited to 'drivers/watchdog/f71808e_wdt.c')
-rw-r--r--drivers/watchdog/f71808e_wdt.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/drivers/watchdog/f71808e_wdt.c b/drivers/watchdog/f71808e_wdt.c
index f7d82d261913..3a0b29cb5854 100644
--- a/drivers/watchdog/f71808e_wdt.c
+++ b/drivers/watchdog/f71808e_wdt.c
@@ -81,7 +81,6 @@ static unsigned short force_id;
module_param(force_id, ushort, 0);
MODULE_PARM_DESC(force_id, "Override the detected device ID");
-static const int max_timeout = WATCHDOG_MAX_TIMEOUT;
static int timeout = WATCHDOG_TIMEOUT; /* default timeout in seconds */
module_param(timeout, int, 0);
MODULE_PARM_DESC(timeout,
@@ -221,7 +220,7 @@ static inline void superio_exit(int base)
static int watchdog_set_timeout(int timeout)
{
if (timeout <= 0
- || timeout > max_timeout) {
+ || timeout > WATCHDOG_MAX_TIMEOUT) {
pr_err("watchdog timeout out of range\n");
return -EINVAL;
}
@@ -720,7 +719,7 @@ static int __init watchdog_init(int sioaddr)
if (start_withtimeout) {
if (start_withtimeout <= 0
- || start_withtimeout > max_timeout) {
+ || start_withtimeout > WATCHDOG_MAX_TIMEOUT) {
pr_err("starting timeout out of range\n");
err = -EINVAL;
goto exit_miscdev;