diff --git a/sys/arm/at91/at91_mci.c b/sys/arm/at91/at91_mci.c index 196aa641ad9b..9a1bb31e7132 100644 --- a/sys/arm/at91/at91_mci.c +++ b/sys/arm/at91/at91_mci.c @@ -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); sc->mem_res = 0; if (sc->irq_res)