static void bt_eisa_release_resources(device_t dev) { struct bt_softc *bt = device_get_softc(dev); if (bt->port) bus_release_resource(dev, SYS_RES_IOPORT, 0, bt->port); if (bt->irq) bus_release_resource(dev, SYS_RES_IRQ, 0, bt->irq); bt_free_softc(dev); }
static void bt_pci_release_resources(device_t dev) { struct bt_softc *bt = device_get_softc(dev); if (bt->port) /* XXX can't cope with memory registers anyway */ bus_release_resource(dev, SYS_RES_IOPORT, BT_PCI_IOADDR, bt->port); if (bt->irq) bus_release_resource(dev, SYS_RES_IRQ, 0, bt->irq); bt_free_softc(dev); }