i cant see why a task is necessary to defer the removal of iic sensors that alias isa ones we find. we should be able to remove the iic sensors directly.
i also dont have a box with this hardware in it, so i cant test. anyone else willing to try? Index: lm78_isa.c =================================================================== RCS file: /cvs/src/sys/dev/isa/lm78_isa.c,v retrieving revision 1.8 diff -u -p -r1.8 lm78_isa.c --- lm78_isa.c 19 Dec 2014 13:53:08 -0000 1.8 +++ lm78_isa.c 1 Jan 2015 02:49:38 -0000 @@ -20,7 +20,6 @@ #include <sys/systm.h> #include <sys/device.h> #include <sys/sensors.h> -#include <sys/task.h> #include <machine/bus.h> #include <dev/isa/isareg.h> @@ -42,7 +41,6 @@ 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; @@ -53,7 +51,7 @@ int lm_wbsio_match(struct device *, voi void lm_isa_attach(struct device *, struct device *, void *); u_int8_t lm_isa_readreg(struct lm_softc *, int); void lm_isa_writereg(struct lm_softc *, int, int); -void lm_isa_remove_alias(void *, void *); +void lm_isa_remove_alias(struct lm_softc *, const char *); struct cfattach lm_isa_ca = { sizeof(struct lm_isa_softc), @@ -233,10 +231,7 @@ lm_isa_attach(struct device *parent, str continue; if (lmsc && lmsc->sbusaddr == sbusaddr && 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); + lm_isa_remove_alias(lmsc, sc->sc_lmsc.sc_dev.dv_xname); break; } } @@ -244,14 +239,12 @@ lm_isa_attach(struct device *parent, str /* Remove sensors of the i2c alias, since we prefer to use the isa access */ void -lm_isa_remove_alias(void *v, void *arg) +lm_isa_remove_alias(struct lm_softc *sc, const char *isa) { - struct lm_softc *sc = v; - char *iic = arg; int i; printf("%s: disabling sensors due to alias with %s\n", - sc->sc_dev.dv_xname, iic); + sc->sc_dev.dv_xname, isa); sensordev_deinstall(&sc->sensordev); for (i = 0; i < sc->numsensors; i++) sensor_detach(&sc->sensordev, &sc->sensors[i]);