From: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
To: Wim Van Sebroeck <wim@iguana.be>,
linux-watchdog@vger.kernel.org,
Guenter Roeck <linux@roeck-us.net>,
mika.westerberg@linux.intel.com
Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Subject: [PATCH v1 1/1] intel-mid_wdt: make sure watchdog is not running at startup
Date: Fri, 18 Nov 2016 16:50:02 +0200 [thread overview]
Message-ID: <20161118145002.140630-1-andriy.shevchenko@linux.intel.com> (raw)
Make sure that the watchdog is not running after loading
and before it is started by opening /dev/watchdog.
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
---
drivers/watchdog/intel-mid_wdt.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/drivers/watchdog/intel-mid_wdt.c b/drivers/watchdog/intel-mid_wdt.c
index db36d12..ff099a3 100644
--- a/drivers/watchdog/intel-mid_wdt.c
+++ b/drivers/watchdog/intel-mid_wdt.c
@@ -151,6 +151,9 @@ static int mid_wdt_probe(struct platform_device *pdev)
return ret;
}
+ /* Make sure the watchdog is not running */
+ wdt_stop(wdt_dev);
+
ret = watchdog_register_device(wdt_dev);
if (ret) {
dev_err(&pdev->dev, "error registering watchdog device\n");
--
2.10.2
next reply other threads:[~2016-11-18 14:50 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-11-18 14:50 Andy Shevchenko [this message]
2016-11-18 15:50 ` [PATCH v1 1/1] intel-mid_wdt: make sure watchdog is not running at startup Guenter Roeck
2016-11-18 17:36 ` Andy Shevchenko
2016-11-19 15:55 ` Guenter Roeck
2016-11-19 16:10 ` Andy Shevchenko
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=20161118145002.140630-1-andriy.shevchenko@linux.intel.com \
--to=andriy.shevchenko@linux.intel.com \
--cc=linux-watchdog@vger.kernel.org \
--cc=linux@roeck-us.net \
--cc=mika.westerberg@linux.intel.com \
--cc=wim@iguana.be \
/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;
as well as URLs for NNTP newsgroup(s).