Module Name: src
Committed By: pgoyette
Date: Wed Mar 27 09:52:16 UTC 2019
Modified Files:
src/sys/dev/sysmon: swwdog.c
Log Message:
Don't create the driver's workqueue twice!
The driver is modular, so its modcmd(MOULE_CMD_INIT) always gets called
whether or not the driver is built-in to the kernel. The modcmd init
code always calls swwdogattach() which creates the workqueue. Therefore
there's no need to also create it in swwdog_attach() (used to attach a
device instance).
To generate a diff of this commit:
cvs rdiff -u -r1.19 -r1.20 src/sys/dev/sysmon/swwdog.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/sys/dev/sysmon/swwdog.c
diff -u src/sys/dev/sysmon/swwdog.c:1.19 src/sys/dev/sysmon/swwdog.c:1.20
--- src/sys/dev/sysmon/swwdog.c:1.19 Tue May 12 10:20:14 2015
+++ src/sys/dev/sysmon/swwdog.c Wed Mar 27 09:52:16 2019
@@ -1,4 +1,4 @@
-/* $NetBSD: swwdog.c,v 1.19 2015/05/12 10:20:14 pgoyette Exp $ */
+/* $NetBSD: swwdog.c,v 1.20 2019/03/27 09:52:16 pgoyette Exp $ */
/*
* Copyright (c) 2004, 2005 Steven M. Bellovin
@@ -33,7 +33,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: swwdog.c,v 1.19 2015/05/12 10:20:14 pgoyette Exp $");
+__KERNEL_RCSID(0, "$NetBSD: swwdog.c,v 1.20 2019/03/27 09:52:16 pgoyette Exp $");
/*
*
@@ -160,11 +160,6 @@ swwdog_attach(device_t parent, device_t
{
struct swwdog_softc *sc = device_private(self);
- if (workqueue_create(&wq, "swwreboot", doreboot, NULL,
- PRI_NONE, IPL_NONE, 0) != 0) {
- aprint_error_dev(self, "failed to create reboot workqueue");
- }
-
sc->sc_dev = self;
sc->sc_smw.smw_name = device_xname(self);
sc->sc_smw.smw_cookie = sc;
@@ -181,7 +176,6 @@ swwdog_attach(device_t parent, device_t
aprint_error_dev(self, "unable to register software "
"watchdog with sysmon\n");
callout_destroy(&sc->sc_c);
- workqueue_destroy(wq);
return;
}