On Thursday, August 23, 2012 5:31:52 pm Warner Losh wrote: > Author: imp > Date: Thu Aug 23 21:31:52 2012 > New Revision: 239623 > URL: http://svn.freebsd.org/changeset/base/239623 > > Log: > Use proper resource type when freeing. > > Submitted by: Ian Lapore (indirectly in a larger patch) > > Modified: > head/sys/arm/at91/at91_mci.c > > Modified: head/sys/arm/at91/at91_mci.c > ============================================================================== > --- head/sys/arm/at91/at91_mci.c Thu Aug 23 19:40:28 2012 > (r239622) > +++ head/sys/arm/at91/at91_mci.c Thu Aug 23 21:31:52 2012 > (r239623) > @@ -299,7 +299,7 @@ at91_mci_deactivate(device_t dev) > sc->intrhand = 0; > bus_generic_detach(sc->dev); > if (sc->mem_res) > - bus_release_resource(dev, SYS_RES_IOPORT, > + bus_release_resource(dev, SYS_RES_MEMORY, > rman_get_rid(sc->mem_res), sc->mem_res);
If I had my way, it would just be 'bus_release_resource(dev, sc->mem_res);'. There's no good reason the resource can't store its rid and type internally. -- John Baldwin _______________________________________________ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"