Commit 48b32199 authored by Jerry Hoemann's avatar Jerry Hoemann Committed by Wim Van Sebroeck

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: default avatarJerry Hoemann <jerry.hoemann@hpe.com>
Reviewed-by: default avatarGuenter Roeck <linux@roeck-us.net>
Signed-off-by: default avatarGuenter Roeck <linux@roeck-us.net>
Signed-off-by: default avatarWim Van Sebroeck <wim@linux-watchdog.org>
parent 215e06f0
......@@ -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 @@ 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);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment