* @brief Helper function for implementing BUS_SET_RESOURCE(). * * This implementation of BUS_SET_RESOURCE() uses the * resource_list_add() function to do most of the work. It calls * BUS_GET_RESOURCE_LIST() to find a suitable resource list to * edit. */
| 4441 | * edit. |
| 4442 | */ |
| 4443 | int |
| 4444 | bus_generic_rl_set_resource(device_t dev, device_t child, int type, int rid, |
| 4445 | rman_res_t start, rman_res_t count) |
| 4446 | { |
| 4447 | struct resource_list * rl = NULL; |
| 4448 | |
| 4449 | rl = BUS_GET_RESOURCE_LIST(dev, child); |
| 4450 | if (!rl) |
| 4451 | return (EINVAL); |
| 4452 | |
| 4453 | resource_list_add(rl, type, rid, start, (start + count - 1), count); |
| 4454 | |
| 4455 | return (0); |
| 4456 | } |
| 4457 | |
| 4458 | /** |
| 4459 | * @brief Helper function for implementing BUS_DELETE_RESOURCE(). |
nothing calls this directly
no test coverage detected