From: Eliav Farber <farbere@amazon.com>
To: <wim@linux-watchdog.org>, <linux@roeck-us.net>,
<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>, <farbere@amazon.com>,
<dwmw@amazon.co.uk>
Subject: [PATCH] watchdog: sp805: disable watchdog on remove
Date: Sun, 3 Apr 2022 05:22:49 +0000 [thread overview]
Message-ID: <20220403052249.48784-1-farbere@amazon.com> (raw)
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);
+
watchdog_unregister_device(&wdt->wdd);
watchdog_set_drvdata(&wdt->wdd, NULL);
--
2.32.0
next reply other threads:[~2022-04-03 5:23 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-04-03 5:22 Eliav Farber [this message]
2022-04-03 5:41 ` Guenter Roeck
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=20220403052249.48784-1-farbere@amazon.com \
--to=farbere@amazon.com \
--cc=dwmw@amazon.co.uk \
--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=linux@roeck-us.net \
--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®