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:
imp 2005-01-19 06:52:19 +00:00
parent 57724945c1
commit 4a464d3b43
2 changed files with 9 additions and 0 deletions

View File

@ -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));
}

View File

@ -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);