aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/acpi
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2009-04-07 14:24:19 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2009-04-07 14:24:19 -0400
commit8e2c4f2844c0e8dcdfe312e5f2204854ca8532c6 (patch)
treef846fcbf6b756b76834e06e412a8248bbfb55b32 /drivers/acpi
parent6a5d263866d699ebf6843105497afc86ee53de5b (diff)
parent72800360fdd782eda3489e555adf3b6b3abc064a (diff)
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jbarnes/pci-2.6
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jbarnes/pci-2.6: PCI: pci_slot: grab refcount on slot's bus PCI Hotplug: acpiphp: grab refcount on p2p subordinate bus PCI: allow PCI core hotplug to remove PCI root bus PCI: Fix oops in pci_vpd_truncate PCI: don't corrupt enable_cnt when doing manual resource alignment PCI: annotate pci_rescan_bus as __ref, not __devinit PCI-IOV: fix missing kernel-doc PCI: Setup disabled bridges even if buses are added PCI: SR-IOV quirk for Intel 82576 NIC
Diffstat (limited to 'drivers/acpi')
-rw-r--r--drivers/acpi/pci_slot.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/drivers/acpi/pci_slot.c b/drivers/acpi/pci_slot.c
index cd1f4467be7b..12158e0d009b 100644
--- a/drivers/acpi/pci_slot.c
+++ b/drivers/acpi/pci_slot.c
@@ -164,6 +164,8 @@ register_slot(acpi_handle handle, u32 lvl, void *context, void **rv)
164 list_add(&slot->list, &slot_list); 164 list_add(&slot->list, &slot_list);
165 mutex_unlock(&slot_list_lock); 165 mutex_unlock(&slot_list_lock);
166 166
167 get_device(&pci_bus->dev);
168
167 dbg("pci_slot: %p, pci_bus: %x, device: %d, name: %s\n", 169 dbg("pci_slot: %p, pci_bus: %x, device: %d, name: %s\n",
168 pci_slot, pci_bus->number, device, name); 170 pci_slot, pci_bus->number, device, name);
169 171
@@ -310,12 +312,15 @@ static void
310acpi_pci_slot_remove(acpi_handle handle) 312acpi_pci_slot_remove(acpi_handle handle)
311{ 313{
312 struct acpi_pci_slot *slot, *tmp; 314 struct acpi_pci_slot *slot, *tmp;
315 struct pci_bus *pbus;
313 316
314 mutex_lock(&slot_list_lock); 317 mutex_lock(&slot_list_lock);
315 list_for_each_entry_safe(slot, tmp, &slot_list, list) { 318 list_for_each_entry_safe(slot, tmp, &slot_list, list) {
316 if (slot->root_handle == handle) { 319 if (slot->root_handle == handle) {
317 list_del(&slot->list); 320 list_del(&slot->list);
321 pbus = slot->pci_slot->bus;
318 pci_destroy_slot(slot->pci_slot); 322 pci_destroy_slot(slot->pci_slot);
323 put_device(&pbus->dev);
319 kfree(slot); 324 kfree(slot);
320 } 325 }
321 } 326 }