FreeBSD/sys/dev/pccard/pccard.c
/*
 * Free resources allocated by pccard_function_init(), May be called as long
 * as the function is disabled.
 *
 * NOTE: This function should be unnecessary.  pccard_function_init should
 * never keep resources initialized.
 */
Free resources allocated by pccard_function_init(), May be called as long
as the function is disabled.

This function should be unnecessary.  pccard_function_init should
never keep resources initialized.
Free resources allocated by pccard_function_init () May be called as long as the function is disabled . This function should be unnecessary . pccard_function_init should never keep resources initialized .
static void
pccard_function_free(struct pccard_function *pf)
{
	struct pccard_ivar *devi = PCCARD_IVAR(pf->dev);
	struct resource_list_entry *rle;
	if (pf->pf_flags & PFF_ENABLED) {
		printf("pccard_function_free: function is enabled");
		return;
	}
	STAILQ_FOREACH(rle, &devi->resources, link) {
		if (rle->res) {
			if (rman_get_device(rle->res) != pf->sc->dev)
				device_printf(pf->sc->dev,
				    "function_free: Resource still owned by "
				    "child, oops. "
				    "(type=%d, rid=%d, addr=%#jx)\n",
				    rle->type, rle->rid,
				    rman_get_start(rle->res));
			BUS_RELEASE_RESOURCE(device_get_parent(pf->sc->dev),
			    pf->sc->dev, rle->type, rle->rid, rle->res);
			rle->res = NULL;
		}
	}
	resource_list_free(&devi->resources);
}
static void pccard_function_free ( struct pccard_function * pf ) { struct pccard_ivar * devi = PCCARD_IVAR ( pf -> dev ) ; struct resource_list_entry * rle ; if ( pf -> pf_flags & PFF_ENABLED ) { printf ( " " ) ; return ; } STAILQ_FOREACH ( rle , & devi -> resources , link ) { if ( rle -> res ) { if ( rman_get_device ( rle -> res ) != pf -> sc -> dev ) device_printf ( pf -> sc -> dev , " " " " " \n " , rle -> type , rle -> rid , rman_get_start ( rle -> res ) ) ; BUS_RELEASE_RESOURCE ( device_get_parent ( pf -> sc -> dev ) , pf -> sc -> dev , rle -> type , rle -> rid , rle -> res ) ; rle -> res = NULL ; } } resource_list_free ( & devi -> resources ) ; }
Free resources allocated by pccard_function_init(), May be called as long
 as the function is disabled.
Free resources allocated by pccard_function_init () May be called as long as the function is disabled .