Changeset View
Changeset View
Standalone View
Standalone View
head/sys/dev/tpm/tpm_tis.c
Show First 20 Lines • Show All 156 Lines • ▼ Show 20 Lines | |||||
} | } | ||||
static int | static int | ||||
tpmtis_detach(device_t dev) | tpmtis_detach(device_t dev) | ||||
{ | { | ||||
struct tpm_sc *sc; | struct tpm_sc *sc; | ||||
sc = device_get_softc(dev); | sc = device_get_softc(dev); | ||||
tpm20_release(sc); | |||||
if (sc->intr_cookie != NULL) | if (sc->intr_cookie != NULL) | ||||
bus_teardown_intr(dev, sc->irq_res, sc->intr_cookie); | bus_teardown_intr(dev, sc->irq_res, sc->intr_cookie); | ||||
if (sc->irq_res != NULL) | if (sc->irq_res != NULL) | ||||
bus_release_resource(dev, SYS_RES_IRQ, | bus_release_resource(dev, SYS_RES_IRQ, | ||||
sc->irq_rid, sc->irq_res); | sc->irq_rid, sc->irq_res); | ||||
if (sc->mem_res != NULL) | if (sc->mem_res != NULL) | ||||
bus_release_resource(dev, SYS_RES_MEMORY, | bus_release_resource(dev, SYS_RES_MEMORY, | ||||
sc->mem_rid, sc->mem_res); | sc->mem_rid, sc->mem_res); | ||||
tpm20_release(sc); | |||||
return (0); | return (0); | ||||
} | } | ||||
static ACPI_STATUS | static ACPI_STATUS | ||||
tpmtis_get_SIRQ_channel(ACPI_RESOURCE *res, void *arg) | tpmtis_get_SIRQ_channel(ACPI_RESOURCE *res, void *arg) | ||||
{ | { | ||||
struct tpm_sc *sc; | struct tpm_sc *sc; | ||||
uint8_t channel; | uint8_t channel; | ||||
▲ Show 20 Lines • Show All 321 Lines • Show Last 20 Lines |