From: Guenter Roeck <linux@roeck-us.net>
To: Eliav Farber <farbere@amazon.com>,
wim@linux-watchdog.org, linux-watchdog@vger.kernel.org,
linux-kernel@vger.kernel.org
Cc: ronenk@amazon.com, talel@amazon.com, hhhawa@amazon.com,
jonnyc@amazon.com, hanochu@amazon.com, dwmw@amazon.co.uk
Subject: Re: [PATCH] watchdog: sp805: disable watchdog on remove
Date: Sat, 2 Apr 2022 22:41:20 -0700 [thread overview]
Message-ID: <1009cf3a-587b-307a-d1c9-efe71cd0a104@roeck-us.net> (raw)
In-Reply-To: <20220403052249.48784-1-farbere@amazon.com>
On 4/2/22 22:22, Eliav Farber wrote:
> Disable the watchdog if it is active while removing the module.
> It is necessary in order to prevent a reset in case watchdog
> hw was running before the removal.
>
> Signed-off-by: Eliav Farber <farbere@amazon.com>
> ---
> drivers/watchdog/sp805_wdt.c | 3 +++
> 1 file changed, 3 insertions(+)
>
> diff --git a/drivers/watchdog/sp805_wdt.c b/drivers/watchdog/sp805_wdt.c
> index d8876fba686d..d7dc0f3f16ec 100644
> --- a/drivers/watchdog/sp805_wdt.c
> +++ b/drivers/watchdog/sp805_wdt.c
> @@ -311,6 +311,9 @@ static int sp805_wdt_remove(struct amba_device *adev)
> {
> struct sp805_wdt *wdt = amba_get_drvdata(adev);
>
> + if (watchdog_active(&wdt->wdd))
> + wdt_disable(&wdt->wdd);
> +
Why not use watchdog_stop_on_unregister() ?
Guenter
> watchdog_unregister_device(&wdt->wdd);
> watchdog_set_drvdata(&wdt->wdd, NULL);
>
next prev parent reply other threads:[~2022-04-03 6:01 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-04-03 5:22 Eliav Farber
2022-04-03 5:41 ` Guenter Roeck [this message]
2022-04-14 5:27 ` [UNVERIFIED SENDER] " Farber, Eliav
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1009cf3a-587b-307a-d1c9-efe71cd0a104@roeck-us.net \
--to=linux@roeck-us.net \
--cc=dwmw@amazon.co.uk \
--cc=farbere@amazon.com \
--cc=hanochu@amazon.com \
--cc=hhhawa@amazon.com \
--cc=jonnyc@amazon.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-watchdog@vger.kernel.org \
--cc=ronenk@amazon.com \
--cc=talel@amazon.com \
--cc=wim@linux-watchdog.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®