Date: Wed, 1 Aug 2007 21:42:41 GMT From: "Constantine A. Murenin" <cnst@FreeBSD.org> To: Perforce Change Reviews <perforce@FreeBSD.org> Subject: PERFORCE change 124491 for review Message-ID: <200708012142.l71LgfPb084894@repoman.freebsd.org>
next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=124491 Change 124491 by cnst@dale on 2007/08/01 21:41:46 add lm_isa_detach for upcoming lm(4) module, which will allow to test more logic from kern_sensors.c Affected files ... .. //depot/projects/soc2007/cnst-sensors/sys.dev.lm/lm78_isa.c#3 edit Differences ... ==== //depot/projects/soc2007/cnst-sensors/sys.dev.lm/lm78_isa.c#3 (text+ko) ==== @@ -1,4 +1,4 @@ -/* $P4: //depot/projects/soc2007/cnst-sensors/sys.dev.lm/lm78_isa.c#2 $ */ +/* $P4: //depot/projects/soc2007/cnst-sensors/sys.dev.lm/lm78_isa.c#3 $ */ /* $FreeBSD$ */ /* $OpenBSD: lm78_isa.c,v 1.2 2007/07/01 21:48:57 cnst Exp $ */ @@ -62,6 +62,7 @@ static int lm_isa_probe(struct device *); static int lm_isa_attach(struct device *); +static int lm_isa_detach(struct device *); u_int8_t lm_isa_readreg(struct lm_softc *, int); void lm_isa_writereg(struct lm_softc *, int, int); @@ -69,6 +70,7 @@ /* Methods from the device interface */ DEVMETHOD(device_probe, lm_isa_probe), DEVMETHOD(device_attach, lm_isa_attach), + DEVMETHOD(device_detach, lm_isa_detach), /* Terminate method list */ { 0, 0 } @@ -222,6 +224,20 @@ return (0); } +int +lm_isa_detach(struct device *dev) +{ + struct lm_isa_softc *sc = device_get_softc(dev); + int error; + + /* Bus-independent detachment */ + error = lm_detach(&sc->sc_lmsc); + + bus_space_unmap(sc->sc_iot, sc->sc_ioh, 8); + + return (error); +} + u_int8_t lm_isa_readreg(struct lm_softc *lmsc, int reg) {
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200708012142.l71LgfPb084894>