summaryrefslogtreecommitdiffstats
path: root/sys/dev/ofw/ofwbus.c
diff options
context:
space:
mode:
Diffstat (limited to 'sys/dev/ofw/ofwbus.c')
-rw-r--r--sys/dev/ofw/ofwbus.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/sys/dev/ofw/ofwbus.c b/sys/dev/ofw/ofwbus.c
index ac0f788..e135513 100644
--- a/sys/dev/ofw/ofwbus.c
+++ b/sys/dev/ofw/ofwbus.c
@@ -399,11 +399,17 @@ ofwbus_adjust_resource(device_t bus, device_t child __unused, int type,
}
static int
-ofwbus_release_resource(device_t bus __unused, device_t child, int type,
+ofwbus_release_resource(device_t bus, device_t child, int type,
int rid, struct resource *r)
{
+ struct resource_list_entry *rle;
int error;
+ /* Clean resource list entry */
+ rle = resource_list_find(BUS_GET_RESOURCE_LIST(bus, child), type, rid);
+ if (rle != NULL)
+ rle->res = NULL;
+
if ((rman_get_flags(r) & RF_ACTIVE) != 0) {
error = bus_deactivate_resource(child, type, rid, r);
if (error)
OpenPOWER on IntegriCloud