- Only check the ivars for direct descendants.
- A couple of whitespace fixes.
This commit is contained in:
parent
39f46280d5
commit
094f2691ca
@ -368,12 +368,13 @@ nexus_alloc_resource(device_t bus, device_t child, int type, int *rid,
|
||||
int needactivate = flags & RF_ACTIVE;
|
||||
|
||||
/*
|
||||
* If this is an allocation of the "default" range for a given RID, and
|
||||
* we know what the resources for this device are (ie. they aren't maintained
|
||||
* by a child bus), then work out the start/end values.
|
||||
* If this is an allocation of the "default" range for a given
|
||||
* RID, and we know what the resources for this device are
|
||||
* (ie. they aren't maintained by a child bus), then work out
|
||||
* the start/end values.
|
||||
*/
|
||||
if ((start == 0UL) && (end == ~0UL) && (count == 1)) {
|
||||
if (ndev == NULL)
|
||||
if (device_get_parent(child) != bus || ndev == NULL)
|
||||
return(NULL);
|
||||
rle = resource_list_find(&ndev->nx_resources, type, *rid);
|
||||
if (rle == NULL)
|
||||
@ -492,6 +493,7 @@ static int
|
||||
nexus_release_resource(device_t bus, device_t child, int type, int rid,
|
||||
struct resource *r)
|
||||
{
|
||||
|
||||
if (rman_get_flags(r) & RF_ACTIVE) {
|
||||
int error = bus_deactivate_resource(child, type, rid, r);
|
||||
if (error)
|
||||
|
Loading…
Reference in New Issue
Block a user