diff mbox series

[3/5] watchdog: meson_gxbb_wdt: add nowayout module param

Message ID 20210623024429.1346349-4-art@khadas.com (mailing list archive)
State Superseded
Headers show
Series watchdog: meson_gxbb_wdt: improve | expand

Commit Message

Art Nikpal June 23, 2021, 2:44 a.m. UTC
Added nowayout module param same as in other moduels

Signed-off-by: Artem Lapkin <art@khadas.com>
---
 drivers/watchdog/meson_gxbb_wdt.c | 6 ++++++
 1 file changed, 6 insertions(+)

Comments

Guenter Roeck June 27, 2021, 3:37 p.m. UTC | #1
On 6/22/21 7:44 PM, Artem Lapkin wrote:
> Added nowayout module param same as in other moduels

Please use complete sentences and words, check your spelling (modules),
and refrain from irrelevant statements such as "same as in other moduels".

"Add nowayout module parameter" is sufficient here.

> 
> Signed-off-by: Artem Lapkin <art@khadas.com>
> ---
>   drivers/watchdog/meson_gxbb_wdt.c | 6 ++++++
>   1 file changed, 6 insertions(+)
> 
> diff --git a/drivers/watchdog/meson_gxbb_wdt.c b/drivers/watchdog/meson_gxbb_wdt.c
> index ecd1fc6f48ba..0bf5dccf70b1 100644
> --- a/drivers/watchdog/meson_gxbb_wdt.c
> +++ b/drivers/watchdog/meson_gxbb_wdt.c
> @@ -34,6 +34,11 @@ module_param(timeout, uint, 0);
>   MODULE_PARM_DESC(timeout, "Watchdog heartbeat in seconds="
>   		 __MODULE_STRING(DEFAULT_TIMEOUT) ")");
>   
> +static bool nowayout = WATCHDOG_NOWAYOUT;
> +module_param(nowayout, bool, 0);
> +MODULE_PARM_DESC(nowayout, "Watchdog cannot be stopped once started default="

'(' missing before 'default'

> +		 __MODULE_STRING(WATCHDOG_NOWAYOUT) ")");
> +
>   struct meson_gxbb_wdt {
>   	void __iomem *reg_base;
>   	struct watchdog_device wdt_dev;
> @@ -190,6 +195,7 @@ static int meson_gxbb_wdt_probe(struct platform_device *pdev)
>   		data->reg_base + GXBB_WDT_CTRL_REG);
>   
>   	meson_gxbb_wdt_set_timeout(&data->wdt_dev, data->wdt_dev.timeout);
> +	watchdog_set_nowayout(&data->wdt_dev, nowayout);
>   
>   	return devm_watchdog_register_device(dev, &data->wdt_dev);
>   }
>
diff mbox series

Patch

diff --git a/drivers/watchdog/meson_gxbb_wdt.c b/drivers/watchdog/meson_gxbb_wdt.c
index ecd1fc6f48ba..0bf5dccf70b1 100644
--- a/drivers/watchdog/meson_gxbb_wdt.c
+++ b/drivers/watchdog/meson_gxbb_wdt.c
@@ -34,6 +34,11 @@  module_param(timeout, uint, 0);
 MODULE_PARM_DESC(timeout, "Watchdog heartbeat in seconds="
 		 __MODULE_STRING(DEFAULT_TIMEOUT) ")");
 
+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) ")");
+
 struct meson_gxbb_wdt {
 	void __iomem *reg_base;
 	struct watchdog_device wdt_dev;
@@ -190,6 +195,7 @@  static int meson_gxbb_wdt_probe(struct platform_device *pdev)
 		data->reg_base + GXBB_WDT_CTRL_REG);
 
 	meson_gxbb_wdt_set_timeout(&data->wdt_dev, data->wdt_dev.timeout);
+	watchdog_set_nowayout(&data->wdt_dev, nowayout);
 
 	return devm_watchdog_register_device(dev, &data->wdt_dev);
 }