diff options
author | Armin Wolf <W_Armin@gmx.de> | 2021-05-08 15:14:56 +0200 |
---|---|---|
committer | Guenter Roeck <linux@roeck-us.net> | 2021-06-17 13:21:44 +0200 |
commit | 989c9c675bbbf3264b42b05e8924a9930b500e6c (patch) | |
tree | 9d06a78e607a2df24b55f860f2451dbc86377595 /drivers/hwmon/sch56xx-common.c | |
parent | hwmon: (sch56xx-common) Use strscpy (diff) | |
download | linux-989c9c675bbbf3264b42b05e8924a9930b500e6c.tar.xz linux-989c9c675bbbf3264b42b05e8924a9930b500e6c.zip |
hwmon: (sch56xx-common) Use helper function
Use watchdog_set_nowayout() to process param
setting and change param type to bool.
Signed-off-by: Armin Wolf <W_Armin@gmx.de>
Link: https://lore.kernel.org/r/20210508131457.12780-4-W_Armin@gmx.de
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
Diffstat (limited to '')
-rw-r--r-- | drivers/hwmon/sch56xx-common.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/drivers/hwmon/sch56xx-common.c b/drivers/hwmon/sch56xx-common.c index da915ca2b3b5..04739bbff8f9 100644 --- a/drivers/hwmon/sch56xx-common.c +++ b/drivers/hwmon/sch56xx-common.c @@ -20,8 +20,8 @@ #include "sch56xx-common.h" /* Insmod parameters */ -static int nowayout = WATCHDOG_NOWAYOUT; -module_param(nowayout, int, 0); +static bool nowayout = WATCHDOG_NOWAYOUT; +module_param(nowayout, bool, 0); MODULE_PARM_DESC(nowayout, "Watchdog cannot be stopped once started (default=" __MODULE_STRING(WATCHDOG_NOWAYOUT) ")"); @@ -420,8 +420,7 @@ void sch56xx_watchdog_register(struct device *parent, u16 addr, u32 revision, data->wddev.timeout = 60; data->wddev.min_timeout = 1; data->wddev.max_timeout = 255 * 60; - if (nowayout) - set_bit(WDOG_NO_WAY_OUT, &data->wddev.status); + watchdog_set_nowayout(&data->wddev, nowayout); if (output_enable & SCH56XX_WDOG_OUTPUT_ENABLE) set_bit(WDOG_ACTIVE, &data->wddev.status); |