diff options
author | 2014-12-19 13:53:08 +0000 | |
---|---|---|
committer | 2014-12-19 13:53:08 +0000 | |
commit | e83e19387d6fb96f54f4dc93d0fdae11aab39e14 (patch) | |
tree | 91bc60c4059a677f2bb4915119ecef4913d27b33 | |
parent | Move cbus.c, cbusvar.h, and pcex.c to new 'cbus' directory, to gather (diff) | |
download | wireguard-openbsd-e83e19387d6fb96f54f4dc93d0fdae11aab39e14.tar.xz wireguard-openbsd-e83e19387d6fb96f54f4dc93d0fdae11aab39e14.zip |
Use taskq rather than workq to remove unwanted alias.
ok mikeb kettenis (for earlier version)
-rw-r--r-- | sys/dev/isa/lm78_isa.c | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/sys/dev/isa/lm78_isa.c b/sys/dev/isa/lm78_isa.c index 2868ca81f9e..39e106ae927 100644 --- a/sys/dev/isa/lm78_isa.c +++ b/sys/dev/isa/lm78_isa.c @@ -1,4 +1,4 @@ -/* $OpenBSD: lm78_isa.c,v 1.7 2011/12/06 16:06:07 mpf Exp $ */ +/* $OpenBSD: lm78_isa.c,v 1.8 2014/12/19 13:53:08 krw Exp $ */ /* * Copyright (c) 2005, 2006 Mark Kettenis @@ -20,7 +20,7 @@ #include <sys/systm.h> #include <sys/device.h> #include <sys/sensors.h> -#include <sys/workq.h> +#include <sys/task.h> #include <machine/bus.h> #include <dev/isa/isareg.h> @@ -42,6 +42,7 @@ extern struct cfdriver lm_cd; struct lm_isa_softc { struct lm_softc sc_lmsc; + struct task sc_remove_alias_task; bus_space_tag_t sc_iot; bus_space_handle_t sc_ioh; @@ -231,9 +232,13 @@ lm_isa_attach(struct device *parent, struct device *self, void *aux) if (lmsc == &sc->sc_lmsc) continue; if (lmsc && lmsc->sbusaddr == sbusaddr && - lmsc->chipid == sc->sc_lmsc.chipid) - workq_add_task(NULL, 0, lm_isa_remove_alias, lmsc, + lmsc->chipid == sc->sc_lmsc.chipid) { + task_set(&sc->sc_remove_alias_task, + lm_isa_remove_alias, lmsc, sc->sc_lmsc.sc_dev.dv_xname); + task_add(systq, &sc->sc_remove_alias_task); + break; + } } } |