child->bridge_ctl = bctl;
cmax = pci_scan_child_bus(child);
- if (cmax > max) max = cmax;
+ if (cmax > max)
+ max = cmax;
+ if (child->subordinate > max)
+ max = child->subordinate;
} else {
/*
* We need to assign a number to this bus which we always
return PCI_CFG_SPACE_SIZE;
}
+static void pci_release_bus_bridge_dev(struct device *dev)
+{
+ kfree(dev);
+}
+
/*
* Read the config data for a PCI device, sanity-check it
* and fill in the dev structure...
return NULL;
/* Fix up broken headers */
- pci_fixup_device(PCI_FIXUP_HEADER, dev);
+ pci_fixup_device(pci_fixup_header, dev);
/*
* Add the device to our list of discovered devices
memset(dev, 0, sizeof(*dev));
dev->parent = parent;
+ dev->release = pci_release_bus_bridge_dev;
sprintf(dev->bus_id, "pci%04x:%02x", pci_domain_nr(b), bus);
device_register(dev);
b->bridge = get_device(dev);