* @brief Releases all the resources in a list. * * @param rl The resource list to purge. * * @returns nothing */
| 3651 | * @returns nothing |
| 3652 | */ |
| 3653 | void |
| 3654 | resource_list_purge(struct resource_list *rl) |
| 3655 | { |
| 3656 | struct resource_list_entry *rle; |
| 3657 | |
| 3658 | while ((rle = STAILQ_FIRST(rl)) != NULL) { |
| 3659 | if (rle->res) |
| 3660 | bus_release_resource(rman_get_device(rle->res), |
| 3661 | rle->type, rle->rid, rle->res); |
| 3662 | STAILQ_REMOVE_HEAD(rl, link); |
| 3663 | free(rle, M_BUS); |
| 3664 | } |
| 3665 | } |
| 3666 | |
| 3667 | device_t |
| 3668 | bus_generic_add_child(device_t dev, u_int order, const char *name, int unit) |
nothing calls this directly
no test coverage detected