Introduce bus_free_resource. It is a convenience function which wraps
bus_release_resource by grabbing the rid from the resource.
This commit is contained in:
parent
9e88c30274
commit
234111d6d0
@ -4017,3 +4017,11 @@ bus_data_generation_update(void)
|
|||||||
{
|
{
|
||||||
bus_data_generation++;
|
bus_data_generation++;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
int
|
||||||
|
bus_free_resource(device_t dev, int type, struct resource *r)
|
||||||
|
{
|
||||||
|
if (r == NULL)
|
||||||
|
return (0);
|
||||||
|
return (bus_release_resource(dev, type, rman_get_rid(r), r));
|
||||||
|
}
|
||||||
|
@ -301,6 +301,7 @@ int bus_deactivate_resource(device_t dev, int type, int rid,
|
|||||||
struct resource *r);
|
struct resource *r);
|
||||||
int bus_release_resource(device_t dev, int type, int rid,
|
int bus_release_resource(device_t dev, int type, int rid,
|
||||||
struct resource *r);
|
struct resource *r);
|
||||||
|
int bus_free_resource(device_t dev, int type, struct resource *r);
|
||||||
int bus_setup_intr(device_t dev, struct resource *r, int flags,
|
int bus_setup_intr(device_t dev, struct resource *r, int flags,
|
||||||
driver_intr_t handler, void *arg, void **cookiep);
|
driver_intr_t handler, void *arg, void **cookiep);
|
||||||
int bus_teardown_intr(device_t dev, struct resource *r, void *cookie);
|
int bus_teardown_intr(device_t dev, struct resource *r, void *cookie);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user