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

Function bus_generic_rl_set_resource

freebsd/kern/subr_bus.c:4443–4456  ·  view source on GitHub ↗

* @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. */

Source from the content-addressed store, hash-verified

4441 * edit.
4442 */
4443int
4444bus_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().

Callers

nothing calls this directly

Calls 1

resource_list_addFunction · 0.85

Tested by

no test coverage detected