PCI: Rename pci_release_bus_bridge_dev() to pci_release_host_bridge_dev()
authorJiang Liu <liuj97@gmail.com>
Fri, 7 Jun 2013 22:16:51 +0000 (16:16 -0600)
committerBjorn Helgaas <bhelgaas@google.com>
Fri, 7 Jun 2013 22:16:51 +0000 (16:16 -0600)
This renames pci_release_bus_bridge_dev() to pci_release_host_bridge_dev()
and moves it next to pci_alloc_host_bridge().  No functional change.

[bhelgaas: split rename & move out of create/destroy symmetry patch]
Signed-off-by: Jiang Liu <jiang.liu@huawei.com>
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
drivers/pci/probe.c

index 15c39cb096195bf7a0d884a3bcda15827cf9cc20..a723b2b93ab4bbe1b69ade468c3a1d4566faed33 100644 (file)
@@ -468,6 +468,18 @@ static struct pci_bus * pci_alloc_bus(void)
        return b;
 }
 
+static void pci_release_host_bridge_dev(struct device *dev)
+{
+       struct pci_host_bridge *bridge = to_pci_host_bridge(dev);
+
+       if (bridge->release_fn)
+               bridge->release_fn(bridge);
+
+       pci_free_resource_list(&bridge->windows);
+
+       kfree(bridge);
+}
+
 static struct pci_host_bridge *pci_alloc_host_bridge(struct pci_bus *b)
 {
        struct pci_host_bridge *bridge;
@@ -1189,18 +1201,6 @@ int pci_cfg_space_size(struct pci_dev *dev)
        return PCI_CFG_SPACE_SIZE;
 }
 
-static void pci_release_bus_bridge_dev(struct device *dev)
-{
-       struct pci_host_bridge *bridge = to_pci_host_bridge(dev);
-
-       if (bridge->release_fn)
-               bridge->release_fn(bridge);
-
-       pci_free_resource_list(&bridge->windows);
-
-       kfree(bridge);
-}
-
 struct pci_dev *pci_alloc_dev(struct pci_bus *bus)
 {
        struct pci_dev *dev;
@@ -1708,7 +1708,7 @@ struct pci_bus *pci_create_root_bus(struct device *parent, int bus,
                goto err_out;
 
        bridge->dev.parent = parent;
-       bridge->dev.release = pci_release_bus_bridge_dev;
+       bridge->dev.release = pci_release_host_bridge_dev;
        dev_set_name(&bridge->dev, "pci%04x:%02x", pci_domain_nr(b), bus);
        error = pcibios_root_bridge_prepare(bridge);
        if (error) {