diff options
author | Jiang Liu <liuj97@gmail.com> | 2013-06-07 18:16:51 -0400 |
---|---|---|
committer | Bjorn Helgaas <bhelgaas@google.com> | 2013-06-07 18:16:51 -0400 |
commit | 70efde2a2920c12f2b14eb640944ca7e61b2c02d (patch) | |
tree | 307367438fdbadae94b6d933602d938541ad8f31 /drivers/pci | |
parent | 343df771e671d821478dd3ef525a0610b808dbf8 (diff) |
PCI: Rename pci_release_bus_bridge_dev() to pci_release_host_bridge_dev()
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>
Diffstat (limited to 'drivers/pci')
-rw-r--r-- | drivers/pci/probe.c | 26 |
1 files changed, 13 insertions, 13 deletions
diff --git a/drivers/pci/probe.c b/drivers/pci/probe.c index 15c39cb09619..a723b2b93ab4 100644 --- a/drivers/pci/probe.c +++ b/drivers/pci/probe.c | |||
@@ -468,6 +468,18 @@ static struct pci_bus * pci_alloc_bus(void) | |||
468 | return b; | 468 | return b; |
469 | } | 469 | } |
470 | 470 | ||
471 | static void pci_release_host_bridge_dev(struct device *dev) | ||
472 | { | ||
473 | struct pci_host_bridge *bridge = to_pci_host_bridge(dev); | ||
474 | |||
475 | if (bridge->release_fn) | ||
476 | bridge->release_fn(bridge); | ||
477 | |||
478 | pci_free_resource_list(&bridge->windows); | ||
479 | |||
480 | kfree(bridge); | ||
481 | } | ||
482 | |||
471 | static struct pci_host_bridge *pci_alloc_host_bridge(struct pci_bus *b) | 483 | static struct pci_host_bridge *pci_alloc_host_bridge(struct pci_bus *b) |
472 | { | 484 | { |
473 | struct pci_host_bridge *bridge; | 485 | struct pci_host_bridge *bridge; |
@@ -1189,18 +1201,6 @@ int pci_cfg_space_size(struct pci_dev *dev) | |||
1189 | return PCI_CFG_SPACE_SIZE; | 1201 | return PCI_CFG_SPACE_SIZE; |
1190 | } | 1202 | } |
1191 | 1203 | ||
1192 | static void pci_release_bus_bridge_dev(struct device *dev) | ||
1193 | { | ||
1194 | struct pci_host_bridge *bridge = to_pci_host_bridge(dev); | ||
1195 | |||
1196 | if (bridge->release_fn) | ||
1197 | bridge->release_fn(bridge); | ||
1198 | |||
1199 | pci_free_resource_list(&bridge->windows); | ||
1200 | |||
1201 | kfree(bridge); | ||
1202 | } | ||
1203 | |||
1204 | struct pci_dev *pci_alloc_dev(struct pci_bus *bus) | 1204 | struct pci_dev *pci_alloc_dev(struct pci_bus *bus) |
1205 | { | 1205 | { |
1206 | struct pci_dev *dev; | 1206 | struct pci_dev *dev; |
@@ -1708,7 +1708,7 @@ struct pci_bus *pci_create_root_bus(struct device *parent, int bus, | |||
1708 | goto err_out; | 1708 | goto err_out; |
1709 | 1709 | ||
1710 | bridge->dev.parent = parent; | 1710 | bridge->dev.parent = parent; |
1711 | bridge->dev.release = pci_release_bus_bridge_dev; | 1711 | bridge->dev.release = pci_release_host_bridge_dev; |
1712 | dev_set_name(&bridge->dev, "pci%04x:%02x", pci_domain_nr(b), bus); | 1712 | dev_set_name(&bridge->dev, "pci%04x:%02x", pci_domain_nr(b), bus); |
1713 | error = pcibios_root_bridge_prepare(bridge); | 1713 | error = pcibios_root_bridge_prepare(bridge); |
1714 | if (error) { | 1714 | if (error) { |