aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJerry Hoemann <[email protected]>2019-05-17 14:59:38 -0600
committerWim Van Sebroeck <[email protected]>2019-07-08 16:10:08 +0200
commit48b32199f97ad2ac23ef4a5b64f2d1bc0aec444f (patch)
tree70e7ce0ff00b1e7b71025f5328eb54d4eed2f647
parent215e06f0d18d5d653d6ea269e4dfc684854d48bf (diff)
watchdog/hpwdt: Stop hpwdt on unregister.
Have the WD core stop the watchdog on unregister instead of explicitly calling hpwdt_stop() in hpwdt_exit(). Signed-off-by: Jerry Hoemann <[email protected]> Reviewed-by: Guenter Roeck <[email protected]> Signed-off-by: Guenter Roeck <[email protected]> Signed-off-by: Wim Van Sebroeck <[email protected]>
-rw-r--r--drivers/watchdog/hpwdt.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/drivers/watchdog/hpwdt.c b/drivers/watchdog/hpwdt.c
index f7b5242b9c85..b2cba8851cf2 100644
--- a/drivers/watchdog/hpwdt.c
+++ b/drivers/watchdog/hpwdt.c
@@ -306,6 +306,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);
watchdog_init_timeout(&hpwdt_dev, soft_margin, NULL);
@@ -343,9 +344,6 @@ error_pci_iomap:
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);