static void auich_freem(void *v, void *ptr, size_t size) { struct auich_softc *sc; struct auich_dma *p, **pp; sc = v; for (pp = &sc->sc_dmas; (p = *pp) != NULL; pp = &p->next) { if (KERNADDR(p) == ptr) { auich_freemem(sc, p); *pp = p->next; kmem_free(p, sizeof(*p)); return; } } }
static void auich_freem(void *v, void *ptr, struct malloc_type *pool) { struct auich_softc *sc; struct auich_dma *p, **pp; sc = v; for (pp = &sc->sc_dmas; (p = *pp) != NULL; pp = &p->next) { if (KERNADDR(p) == ptr) { auich_freemem(sc, p); *pp = p->next; free(p, pool); return; } } }