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
57724945c1
commit
4a464d3b43
@ -4017,3 +4017,11 @@ bus_data_generation_update(void)
|
||||
{
|
||||
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);
|
||||
int bus_release_resource(device_t dev, int type, int rid,
|
||||
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,
|
||||
driver_intr_t handler, void *arg, void **cookiep);
|
||||
int bus_teardown_intr(device_t dev, struct resource *r, void *cookie);
|
||||
|
Loading…
Reference in New Issue
Block a user