Linux-Watchdog Archive on lore.kernel.org
 help / Atom feed
From: Jerry Hoemann <jerry.hoemann@hpe.com>
To: linux@roeck-us.net, wim@linux-watchdog.org,
	linux-watchdog@vger.kernel.org
Cc: linux-kernel@vger.kernel.org, mironov.ivan@gmail.com,
	rasmus.villemoes@prevas.dk, jerry.hoemann@hpe.com
Subject: [PATCH 1/6] watchdog/hpwdt: Stop hpwdt on unregister.
Date: Fri, 17 May 2019 14:59:38 -0600
Message-ID: <1558126783-4877-2-git-send-email-jerry.hoemann@hpe.com> (raw)
In-Reply-To: <1558126783-4877-1-git-send-email-jerry.hoemann@hpe.com>

Have the WD core stop the watchdog on unregister instead of explicitly
calling hpwdt_stop() in hpwdt_exit().

Signed-off-by: Jerry Hoemann <jerry.hoemann@hpe.com>
---
 drivers/watchdog/hpwdt.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/drivers/watchdog/hpwdt.c b/drivers/watchdog/hpwdt.c
index ef30c7e..8c49f13 100644
--- a/drivers/watchdog/hpwdt.c
+++ b/drivers/watchdog/hpwdt.c
@@ -310,6 +310,7 @@ static int hpwdt_init_one(struct pci_dev *dev,
 	if (retval != 0)
 		goto error_init_nmi_decoding;
 
+	watchdog_stop_on_unregister(&hpwdt_dev);
 	watchdog_set_nowayout(&hpwdt_dev, nowayout);
 	if (watchdog_init_timeout(&hpwdt_dev, soft_margin, NULL))
 		dev_warn(&dev->dev, "Invalid soft_margin: %d.\n", soft_margin);
@@ -350,9 +351,6 @@ static int hpwdt_init_one(struct pci_dev *dev,
 
 static void hpwdt_exit(struct pci_dev *dev)
 {
-	if (!nowayout)
-		hpwdt_stop();
-
 	watchdog_unregister_device(&hpwdt_dev);
 	hpwdt_exit_nmi_decoding();
 	pci_iounmap(dev, pci_mem_addr);
-- 
1.8.3.1


  reply index

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-05-17 20:59 [PATCH 0/6] watchdog/hpwdt: cleanups and kdump accommodations Jerry Hoemann
2019-05-17 20:59 ` Jerry Hoemann [this message]
2019-05-17 20:59 ` [PATCH 2/6] watchdog/hpwdt: Advertize max_hw_heartbeat_ms Jerry Hoemann
2019-05-17 20:59 ` [PATCH 3/6] watchdog/hpwdt: Have core ping watchdog Jerry Hoemann
2019-05-17 20:59 ` [PATCH 4/6] watchdog/hpwdt: Add module parameter kdumptimeout Jerry Hoemann
2019-05-17 20:59 ` [PATCH 5/6] watchdog/hpwdt: Update documentation Jerry Hoemann
2019-05-17 20:59 ` [PATCH 6/6] watchdog/hpwdt: Reflect changes Jerry Hoemann

Reply instructions:

You may reply publically 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=1558126783-4877-2-git-send-email-jerry.hoemann@hpe.com \
    --to=jerry.hoemann@hpe.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-watchdog@vger.kernel.org \
    --cc=linux@roeck-us.net \
    --cc=mironov.ivan@gmail.com \
    --cc=rasmus.villemoes@prevas.dk \
    --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

Linux-Watchdog Archive on lore.kernel.org

Archives are clonable:
	git clone --mirror https://lore.kernel.org/linux-watchdog/0 linux-watchdog/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 linux-watchdog linux-watchdog/ https://lore.kernel.org/linux-watchdog \
		linux-watchdog@vger.kernel.org linux-watchdog@archiver.kernel.org
	public-inbox-index linux-watchdog


Newsgroup available over NNTP:
	nntp://nntp.lore.kernel.org/org.kernel.vger.linux-watchdog


AGPL code for this site: git clone https://public-inbox.org/ public-inbox