diff options
author | Mark Kettenis <kettenis@cvs.openbsd.org> | 2006-01-26 22:07:15 +0000 |
---|---|---|
committer | Mark Kettenis <kettenis@cvs.openbsd.org> | 2006-01-26 22:07:15 +0000 |
commit | 2ae7f10106652c83326282cc4ebdd367931919bb (patch) | |
tree | 02009905698685e62b5877473aad7e1882b8fa8a /sys/dev/isa/lm_isa.c | |
parent | c8f5fa24f30170186fc9af2f82f22737a9166d19 (diff) |
Make lm at iic detach properly, and use config_detach(9) to fully detach
lm at iic if we attach lm at isa for the same chip.
tested by robert@, krw@
Diffstat (limited to 'sys/dev/isa/lm_isa.c')
-rw-r--r-- | sys/dev/isa/lm_isa.c | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/sys/dev/isa/lm_isa.c b/sys/dev/isa/lm_isa.c index a26eec646cd..3499be4051a 100644 --- a/sys/dev/isa/lm_isa.c +++ b/sys/dev/isa/lm_isa.c @@ -1,4 +1,4 @@ -/* $OpenBSD: lm_isa.c,v 1.9 2006/01/23 18:45:33 kettenis Exp $ */ +/* $OpenBSD: lm_isa.c,v 1.10 2006/01/26 22:07:14 kettenis Exp $ */ /* $NetBSD: lm_isa.c,v 1.9 2002/11/15 14:55:44 ad Exp $ */ /*- @@ -157,7 +157,7 @@ lm_isa_attach(struct device *parent, struct device *self, void *aux) struct lm_isa_softc *sc = (struct lm_isa_softc *)self; struct isa_attach_args *ia = aux; struct lm_softc *lmsc; - int iobase, i, j; + int iobase, i; u_int8_t sbusaddr; sc->sc_iot = ia->ia_iot; @@ -191,11 +191,8 @@ 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) { - sensor_task_unregister(lmsc); - for (j = 0; j < lmsc->numsensors; j++) - lmsc->sensors[j].flags = SENSOR_FINVALID; - } + lmsc->chipid == sc->sc_lmsc.chipid) + config_detach(&lmsc->sc_dev, 0); } } |