diff options
author | Yinghai Lu <yinghai@kernel.org> | 2012-02-25 16:54:20 -0500 |
---|---|---|
committer | Jesse Barnes <jbarnes@virtuousgeek.org> | 2012-02-27 15:12:18 -0500 |
commit | 210647af897af8ef2d00828aa2a6b1b42206aae6 (patch) | |
tree | bdb048c8fc7db6fb7b84134c1a6127c52da60ed3 /drivers/pci | |
parent | 3cf8b64380af6fd515740b010606ada4637818c5 (diff) |
PCI: Rename pci_remove_bus_device to pci_stop_and_remove_bus_device
The old pci_remove_bus_device actually did stop and remove.
Make the name reflect that to reduce confusion.
This patch is done by sed scripts and changes back some incorrect
__pci_remove_bus_device changes.
Suggested-by: Jesse Barnes <jbarnes@virtuousgeek.org>
Signed-off-by: Yinghai Lu <yinghai@kernel.org>
Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
Diffstat (limited to 'drivers/pci')
-rw-r--r-- | drivers/pci/hotplug/acpiphp_glue.c | 4 | ||||
-rw-r--r-- | drivers/pci/hotplug/cpci_hotplug_pci.c | 2 | ||||
-rw-r--r-- | drivers/pci/hotplug/cpqphp_pci.c | 2 | ||||
-rw-r--r-- | drivers/pci/hotplug/fakephp.c | 2 | ||||
-rw-r--r-- | drivers/pci/hotplug/ibmphp_core.c | 2 | ||||
-rw-r--r-- | drivers/pci/hotplug/pciehp_pci.c | 2 | ||||
-rw-r--r-- | drivers/pci/hotplug/rpadlpar_core.c | 2 | ||||
-rw-r--r-- | drivers/pci/hotplug/sgi_hotplug.c | 2 | ||||
-rw-r--r-- | drivers/pci/hotplug/shpchp_pci.c | 2 | ||||
-rw-r--r-- | drivers/pci/iov.c | 4 | ||||
-rw-r--r-- | drivers/pci/pci-sysfs.c | 2 | ||||
-rw-r--r-- | drivers/pci/remove.c | 8 | ||||
-rw-r--r-- | drivers/pci/xen-pcifront.c | 4 |
13 files changed, 19 insertions, 19 deletions
diff --git a/drivers/pci/hotplug/acpiphp_glue.c b/drivers/pci/hotplug/acpiphp_glue.c index 12d070ca7674..fdc34b599e7b 100644 --- a/drivers/pci/hotplug/acpiphp_glue.c +++ b/drivers/pci/hotplug/acpiphp_glue.c | |||
@@ -910,7 +910,7 @@ static int disable_device(struct acpiphp_slot *slot) | |||
910 | disable_bridges(pdev->subordinate); | 910 | disable_bridges(pdev->subordinate); |
911 | pci_disable_device(pdev); | 911 | pci_disable_device(pdev); |
912 | } | 912 | } |
913 | pci_remove_bus_device(pdev); | 913 | pci_stop_and_remove_bus_device(pdev); |
914 | pci_dev_put(pdev); | 914 | pci_dev_put(pdev); |
915 | } | 915 | } |
916 | } | 916 | } |
@@ -1067,7 +1067,7 @@ static void acpiphp_sanitize_bus(struct pci_bus *bus) | |||
1067 | res->end) { | 1067 | res->end) { |
1068 | /* Could not assign a required resources | 1068 | /* Could not assign a required resources |
1069 | * for this device, remove it */ | 1069 | * for this device, remove it */ |
1070 | pci_remove_bus_device(dev); | 1070 | pci_stop_and_remove_bus_device(dev); |
1071 | break; | 1071 | break; |
1072 | } | 1072 | } |
1073 | } | 1073 | } |
diff --git a/drivers/pci/hotplug/cpci_hotplug_pci.c b/drivers/pci/hotplug/cpci_hotplug_pci.c index 829c327cfb5e..ae853ccd0cd5 100644 --- a/drivers/pci/hotplug/cpci_hotplug_pci.c +++ b/drivers/pci/hotplug/cpci_hotplug_pci.c | |||
@@ -341,7 +341,7 @@ int cpci_unconfigure_slot(struct slot* slot) | |||
341 | dev = pci_get_slot(slot->bus, | 341 | dev = pci_get_slot(slot->bus, |
342 | PCI_DEVFN(PCI_SLOT(slot->devfn), i)); | 342 | PCI_DEVFN(PCI_SLOT(slot->devfn), i)); |
343 | if (dev) { | 343 | if (dev) { |
344 | pci_remove_bus_device(dev); | 344 | pci_stop_and_remove_bus_device(dev); |
345 | pci_dev_put(dev); | 345 | pci_dev_put(dev); |
346 | } | 346 | } |
347 | } | 347 | } |
diff --git a/drivers/pci/hotplug/cpqphp_pci.c b/drivers/pci/hotplug/cpqphp_pci.c index 6173b9a4544e..1c8494021a42 100644 --- a/drivers/pci/hotplug/cpqphp_pci.c +++ b/drivers/pci/hotplug/cpqphp_pci.c | |||
@@ -127,7 +127,7 @@ int cpqhp_unconfigure_device(struct pci_func* func) | |||
127 | struct pci_dev* temp = pci_get_bus_and_slot(func->bus, PCI_DEVFN(func->device, j)); | 127 | struct pci_dev* temp = pci_get_bus_and_slot(func->bus, PCI_DEVFN(func->device, j)); |
128 | if (temp) { | 128 | if (temp) { |
129 | pci_dev_put(temp); | 129 | pci_dev_put(temp); |
130 | pci_remove_bus_device(temp); | 130 | pci_stop_and_remove_bus_device(temp); |
131 | } | 131 | } |
132 | } | 132 | } |
133 | return 0; | 133 | return 0; |
diff --git a/drivers/pci/hotplug/fakephp.c b/drivers/pci/hotplug/fakephp.c index 17d10e2e8fb6..a019c9a712be 100644 --- a/drivers/pci/hotplug/fakephp.c +++ b/drivers/pci/hotplug/fakephp.c | |||
@@ -40,7 +40,7 @@ static ssize_t legacy_show(struct kobject *kobj, struct attribute *attr, | |||
40 | 40 | ||
41 | static void remove_callback(void *data) | 41 | static void remove_callback(void *data) |
42 | { | 42 | { |
43 | pci_remove_bus_device((struct pci_dev *)data); | 43 | pci_stop_and_remove_bus_device((struct pci_dev *)data); |
44 | } | 44 | } |
45 | 45 | ||
46 | static ssize_t legacy_store(struct kobject *kobj, struct attribute *attr, | 46 | static ssize_t legacy_store(struct kobject *kobj, struct attribute *attr, |
diff --git a/drivers/pci/hotplug/ibmphp_core.c b/drivers/pci/hotplug/ibmphp_core.c index 5506e0e8fbc0..4fda7e6a86a7 100644 --- a/drivers/pci/hotplug/ibmphp_core.c +++ b/drivers/pci/hotplug/ibmphp_core.c | |||
@@ -721,7 +721,7 @@ static void ibm_unconfigure_device(struct pci_func *func) | |||
721 | for (j = 0; j < 0x08; j++) { | 721 | for (j = 0; j < 0x08; j++) { |
722 | temp = pci_get_bus_and_slot(func->busno, (func->device << 3) | j); | 722 | temp = pci_get_bus_and_slot(func->busno, (func->device << 3) | j); |
723 | if (temp) { | 723 | if (temp) { |
724 | pci_remove_bus_device(temp); | 724 | pci_stop_and_remove_bus_device(temp); |
725 | pci_dev_put(temp); | 725 | pci_dev_put(temp); |
726 | } | 726 | } |
727 | } | 727 | } |
diff --git a/drivers/pci/hotplug/pciehp_pci.c b/drivers/pci/hotplug/pciehp_pci.c index a4031dfe938e..47d9dc06b109 100644 --- a/drivers/pci/hotplug/pciehp_pci.c +++ b/drivers/pci/hotplug/pciehp_pci.c | |||
@@ -141,7 +141,7 @@ int pciehp_unconfigure_device(struct slot *p_slot) | |||
141 | break; | 141 | break; |
142 | } | 142 | } |
143 | } | 143 | } |
144 | pci_remove_bus_device(temp); | 144 | pci_stop_and_remove_bus_device(temp); |
145 | /* | 145 | /* |
146 | * Ensure that no new Requests will be generated from | 146 | * Ensure that no new Requests will be generated from |
147 | * the device. | 147 | * the device. |
diff --git a/drivers/pci/hotplug/rpadlpar_core.c b/drivers/pci/hotplug/rpadlpar_core.c index c56a9413e1af..1e117c2a3cad 100644 --- a/drivers/pci/hotplug/rpadlpar_core.c +++ b/drivers/pci/hotplug/rpadlpar_core.c | |||
@@ -389,7 +389,7 @@ int dlpar_remove_pci_slot(char *drc_name, struct device_node *dn) | |||
389 | BUG_ON(!bus->self); | 389 | BUG_ON(!bus->self); |
390 | pr_debug("PCI: Now removing bridge device %s\n", pci_name(bus->self)); | 390 | pr_debug("PCI: Now removing bridge device %s\n", pci_name(bus->self)); |
391 | eeh_remove_bus_device(bus->self); | 391 | eeh_remove_bus_device(bus->self); |
392 | pci_remove_bus_device(bus->self); | 392 | pci_stop_and_remove_bus_device(bus->self); |
393 | 393 | ||
394 | return 0; | 394 | return 0; |
395 | } | 395 | } |
diff --git a/drivers/pci/hotplug/sgi_hotplug.c b/drivers/pci/hotplug/sgi_hotplug.c index 72d507b6a2aa..de573113c102 100644 --- a/drivers/pci/hotplug/sgi_hotplug.c +++ b/drivers/pci/hotplug/sgi_hotplug.c | |||
@@ -554,7 +554,7 @@ static int disable_slot(struct hotplug_slot *bss_hotplug_slot) | |||
554 | PCI_FUNC(func))); | 554 | PCI_FUNC(func))); |
555 | if (dev) { | 555 | if (dev) { |
556 | sn_bus_free_data(dev); | 556 | sn_bus_free_data(dev); |
557 | pci_remove_bus_device(dev); | 557 | pci_stop_and_remove_bus_device(dev); |
558 | pci_dev_put(dev); | 558 | pci_dev_put(dev); |
559 | } | 559 | } |
560 | } | 560 | } |
diff --git a/drivers/pci/hotplug/shpchp_pci.c b/drivers/pci/hotplug/shpchp_pci.c index a2ccfcd3c298..df7e4bfadae3 100644 --- a/drivers/pci/hotplug/shpchp_pci.c +++ b/drivers/pci/hotplug/shpchp_pci.c | |||
@@ -124,7 +124,7 @@ int shpchp_unconfigure_device(struct slot *p_slot) | |||
124 | break; | 124 | break; |
125 | } | 125 | } |
126 | } | 126 | } |
127 | pci_remove_bus_device(temp); | 127 | pci_stop_and_remove_bus_device(temp); |
128 | pci_dev_put(temp); | 128 | pci_dev_put(temp); |
129 | } | 129 | } |
130 | return rc; | 130 | return rc; |
diff --git a/drivers/pci/iov.c b/drivers/pci/iov.c index 687b3c8e8e3b..6554e1a0f634 100644 --- a/drivers/pci/iov.c +++ b/drivers/pci/iov.c | |||
@@ -142,7 +142,7 @@ failed2: | |||
142 | failed1: | 142 | failed1: |
143 | pci_dev_put(dev); | 143 | pci_dev_put(dev); |
144 | mutex_lock(&iov->dev->sriov->lock); | 144 | mutex_lock(&iov->dev->sriov->lock); |
145 | pci_remove_bus_device(virtfn); | 145 | pci_stop_and_remove_bus_device(virtfn); |
146 | virtfn_remove_bus(dev->bus, virtfn_bus(dev, id)); | 146 | virtfn_remove_bus(dev->bus, virtfn_bus(dev, id)); |
147 | mutex_unlock(&iov->dev->sriov->lock); | 147 | mutex_unlock(&iov->dev->sriov->lock); |
148 | 148 | ||
@@ -182,7 +182,7 @@ static void virtfn_remove(struct pci_dev *dev, int id, int reset) | |||
182 | sysfs_remove_link(&virtfn->dev.kobj, "physfn"); | 182 | sysfs_remove_link(&virtfn->dev.kobj, "physfn"); |
183 | 183 | ||
184 | mutex_lock(&iov->dev->sriov->lock); | 184 | mutex_lock(&iov->dev->sriov->lock); |
185 | pci_remove_bus_device(virtfn); | 185 | pci_stop_and_remove_bus_device(virtfn); |
186 | virtfn_remove_bus(dev->bus, virtfn_bus(dev, id)); | 186 | virtfn_remove_bus(dev->bus, virtfn_bus(dev, id)); |
187 | mutex_unlock(&iov->dev->sriov->lock); | 187 | mutex_unlock(&iov->dev->sriov->lock); |
188 | 188 | ||
diff --git a/drivers/pci/pci-sysfs.c b/drivers/pci/pci-sysfs.c index d9723039e99a..a55e248618cd 100644 --- a/drivers/pci/pci-sysfs.c +++ b/drivers/pci/pci-sysfs.c | |||
@@ -330,7 +330,7 @@ static void remove_callback(struct device *dev) | |||
330 | struct pci_dev *pdev = to_pci_dev(dev); | 330 | struct pci_dev *pdev = to_pci_dev(dev); |
331 | 331 | ||
332 | mutex_lock(&pci_remove_rescan_mutex); | 332 | mutex_lock(&pci_remove_rescan_mutex); |
333 | pci_remove_bus_device(pdev); | 333 | pci_stop_and_remove_bus_device(pdev); |
334 | mutex_unlock(&pci_remove_rescan_mutex); | 334 | mutex_unlock(&pci_remove_rescan_mutex); |
335 | } | 335 | } |
336 | 336 | ||
diff --git a/drivers/pci/remove.c b/drivers/pci/remove.c index 82f8ae572703..7abe67b45cc8 100644 --- a/drivers/pci/remove.c +++ b/drivers/pci/remove.c | |||
@@ -79,7 +79,7 @@ EXPORT_SYMBOL(pci_remove_bus); | |||
79 | 79 | ||
80 | static void __pci_remove_behind_bridge(struct pci_dev *dev); | 80 | static void __pci_remove_behind_bridge(struct pci_dev *dev); |
81 | /** | 81 | /** |
82 | * pci_remove_bus_device - remove a PCI device and any children | 82 | * pci_stop_and_remove_bus_device - remove a PCI device and any children |
83 | * @dev: the device to remove | 83 | * @dev: the device to remove |
84 | * | 84 | * |
85 | * Remove a PCI device from the device lists, informing the drivers | 85 | * Remove a PCI device from the device lists, informing the drivers |
@@ -102,7 +102,7 @@ static void __pci_remove_bus_device(struct pci_dev *dev) | |||
102 | 102 | ||
103 | pci_destroy_dev(dev); | 103 | pci_destroy_dev(dev); |
104 | } | 104 | } |
105 | void pci_remove_bus_device(struct pci_dev *dev) | 105 | void pci_stop_and_remove_bus_device(struct pci_dev *dev) |
106 | { | 106 | { |
107 | pci_stop_bus_device(dev); | 107 | pci_stop_bus_device(dev); |
108 | __pci_remove_bus_device(dev); | 108 | __pci_remove_bus_device(dev); |
@@ -145,7 +145,7 @@ static void pci_stop_bus_devices(struct pci_bus *bus) | |||
145 | struct list_head *l, *n; | 145 | struct list_head *l, *n; |
146 | 146 | ||
147 | /* | 147 | /* |
148 | * VFs could be removed by pci_remove_bus_device() in the | 148 | * VFs could be removed by pci_stop_and_remove_bus_device() in the |
149 | * pci_stop_bus_devices() code path for PF. | 149 | * pci_stop_bus_devices() code path for PF. |
150 | * aka, bus->devices get updated in the process. | 150 | * aka, bus->devices get updated in the process. |
151 | * but VFs are inserted after PFs when SRIOV is enabled for PF, | 151 | * but VFs are inserted after PFs when SRIOV is enabled for PF, |
@@ -174,6 +174,6 @@ void pci_stop_bus_device(struct pci_dev *dev) | |||
174 | pci_stop_dev(dev); | 174 | pci_stop_dev(dev); |
175 | } | 175 | } |
176 | 176 | ||
177 | EXPORT_SYMBOL(pci_remove_bus_device); | 177 | EXPORT_SYMBOL(pci_stop_and_remove_bus_device); |
178 | EXPORT_SYMBOL(pci_remove_behind_bridge); | 178 | EXPORT_SYMBOL(pci_remove_behind_bridge); |
179 | EXPORT_SYMBOL_GPL(pci_stop_bus_device); | 179 | EXPORT_SYMBOL_GPL(pci_stop_bus_device); |
diff --git a/drivers/pci/xen-pcifront.c b/drivers/pci/xen-pcifront.c index 7cf3d2fcf56a..fb8a39c7c3d6 100644 --- a/drivers/pci/xen-pcifront.c +++ b/drivers/pci/xen-pcifront.c | |||
@@ -544,7 +544,7 @@ static void free_root_bus_devs(struct pci_bus *bus) | |||
544 | dev = container_of(bus->devices.next, struct pci_dev, | 544 | dev = container_of(bus->devices.next, struct pci_dev, |
545 | bus_list); | 545 | bus_list); |
546 | dev_dbg(&dev->dev, "removing device\n"); | 546 | dev_dbg(&dev->dev, "removing device\n"); |
547 | pci_remove_bus_device(dev); | 547 | pci_stop_and_remove_bus_device(dev); |
548 | } | 548 | } |
549 | } | 549 | } |
550 | 550 | ||
@@ -1045,7 +1045,7 @@ static int pcifront_detach_devices(struct pcifront_device *pdev) | |||
1045 | domain, bus, slot, func); | 1045 | domain, bus, slot, func); |
1046 | continue; | 1046 | continue; |
1047 | } | 1047 | } |
1048 | pci_remove_bus_device(pci_dev); | 1048 | pci_stop_and_remove_bus_device(pci_dev); |
1049 | pci_dev_put(pci_dev); | 1049 | pci_dev_put(pci_dev); |
1050 | 1050 | ||
1051 | dev_dbg(&pdev->xdev->dev, | 1051 | dev_dbg(&pdev->xdev->dev, |