MCPcopy Create free account
hub / github.com/F-Stack/f-stack / versatile_sic_detach

Function versatile_sic_detach

freebsd/arm/versatile/versatile_sic.c:276–298  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

274}
275
276static int
277versatile_sic_detach(device_t dev)
278{
279 struct versatile_sic_softc *sc;
280
281 sc = device_get_softc(dev);
282
283 if (sc->intrh)
284 bus_teardown_intr(dev, sc->irq_res, sc->intrh);
285
286 if (sc->mem_res == NULL)
287 bus_release_resource(dev, SYS_RES_MEMORY,
288 rman_get_rid(sc->mem_res), sc->mem_res);
289
290 if (sc->irq_res == NULL)
291 bus_release_resource(dev, SYS_RES_IRQ,
292 rman_get_rid(sc->irq_res), sc->irq_res);
293
294 mtx_destroy(&sc->mtx);
295
296 return (0);
297
298}
299
300static device_method_t versatile_sic_methods[] = {
301 DEVMETHOD(device_probe, versatile_sic_probe),

Callers 1

versatile_sic_attachFunction · 0.85

Calls 4

device_get_softcFunction · 0.85
bus_teardown_intrFunction · 0.85
bus_release_resourceFunction · 0.85
rman_get_ridFunction · 0.85

Tested by

no test coverage detected