diff options
Diffstat (limited to 'drivers/pci/probe.c')
-rw-r--r-- | drivers/pci/probe.c | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/drivers/pci/probe.c b/drivers/pci/probe.c index 586d83d8be4d..cbf0d0c1b009 100644 --- a/drivers/pci/probe.c +++ b/drivers/pci/probe.c @@ -517,9 +517,7 @@ static void pci_release_host_bridge_dev(struct device *dev) if (bridge->release_fn) bridge->release_fn(bridge); - pci_free_resource_list(&bridge->windows); - - kfree(bridge); + pci_free_host_bridge(bridge); } struct pci_host_bridge *pci_alloc_host_bridge(size_t priv) @@ -537,6 +535,14 @@ struct pci_host_bridge *pci_alloc_host_bridge(size_t priv) } EXPORT_SYMBOL(pci_alloc_host_bridge); +void pci_free_host_bridge(struct pci_host_bridge *bridge) +{ + pci_free_resource_list(&bridge->windows); + + kfree(bridge); +} +EXPORT_SYMBOL(pci_free_host_bridge); + static const unsigned char pcix_bus_speed[] = { PCI_SPEED_UNKNOWN, /* 0 */ PCI_SPEED_66MHz_PCIX, /* 1 */ |