diff options
author | Bjorn Helgaas <bhelgaas@google.com> | 2012-08-23 20:36:10 -0400 |
---|---|---|
committer | Bjorn Helgaas <bhelgaas@google.com> | 2012-08-23 20:36:10 -0400 |
commit | 7bf79d8a9904ee1ed354e7e655f8045afda67fd6 (patch) | |
tree | fde1ddd5e0743b9585bef508ff0baf7a8d90288f /drivers/pci/hotplug | |
parent | a28afda8cc6a45b2c5a4f98cf8fcddd877597701 (diff) | |
parent | c29aabe22eafb4914aecebab6e99623894d81564 (diff) |
Merge branch 'pci/bjorn-cleanup-remove' into next
* pci/bjorn-cleanup-remove:
PCI: Remove unused pci_dev_b()
sgi-agp: Use list_for_each_entry() for bus->devices traversal
parisc/PCI: Use list_for_each_entry() for bus->devices traversal
parisc/PCI: Enable PERR/SERR on all devices
frv/PCI: Use list_for_each_entry() for bus->devices traversal
PCI: Leave normal LIST_POISON in deleted list entries
PCI: Rename local variables to conventional names
PCI: Remove unused, commented-out, code
PCI: Stop and remove devices in one pass
PCI: Fold stop and remove helpers into their callers
PCI: Use list_for_each_entry() for bus->devices traversal
PCI: Remove pci_stop_and_remove_behind_bridge()
PCI: Don't export stop_bus_device and remove_bus_device interfaces
pcmcia: Use common pci_stop_and_remove_bus_device()
PCI: acpiphp: Use common pci_stop_and_remove_bus_device()
PCI: acpiphp: Stop disabling bridges on remove
Diffstat (limited to 'drivers/pci/hotplug')
-rw-r--r-- | drivers/pci/hotplug/acpiphp_glue.c | 46 |
1 files changed, 1 insertions, 45 deletions
diff --git a/drivers/pci/hotplug/acpiphp_glue.c b/drivers/pci/hotplug/acpiphp_glue.c index ad6fd6695495..7be4ca5e1f4c 100644 --- a/drivers/pci/hotplug/acpiphp_glue.c +++ b/drivers/pci/hotplug/acpiphp_glue.c | |||
@@ -869,17 +869,6 @@ static int __ref enable_device(struct acpiphp_slot *slot) | |||
869 | return retval; | 869 | return retval; |
870 | } | 870 | } |
871 | 871 | ||
872 | static void disable_bridges(struct pci_bus *bus) | ||
873 | { | ||
874 | struct pci_dev *dev; | ||
875 | list_for_each_entry(dev, &bus->devices, bus_list) { | ||
876 | if (dev->subordinate) { | ||
877 | disable_bridges(dev->subordinate); | ||
878 | pci_disable_device(dev); | ||
879 | } | ||
880 | } | ||
881 | } | ||
882 | |||
883 | /* return first device in slot, acquiring a reference on it */ | 872 | /* return first device in slot, acquiring a reference on it */ |
884 | static struct pci_dev *dev_in_slot(struct acpiphp_slot *slot) | 873 | static struct pci_dev *dev_in_slot(struct acpiphp_slot *slot) |
885 | { | 874 | { |
@@ -931,12 +920,7 @@ static int disable_device(struct acpiphp_slot *slot) | |||
931 | * here. | 920 | * here. |
932 | */ | 921 | */ |
933 | while ((pdev = dev_in_slot(slot))) { | 922 | while ((pdev = dev_in_slot(slot))) { |
934 | pci_stop_bus_device(pdev); | 923 | pci_stop_and_remove_bus_device(pdev); |
935 | if (pdev->subordinate) { | ||
936 | disable_bridges(pdev->subordinate); | ||
937 | pci_disable_device(pdev); | ||
938 | } | ||
939 | __pci_remove_bus_device(pdev); | ||
940 | pci_dev_put(pdev); | 924 | pci_dev_put(pdev); |
941 | } | 925 | } |
942 | 926 | ||
@@ -1477,34 +1461,6 @@ int __init acpiphp_get_num_slots(void) | |||
1477 | } | 1461 | } |
1478 | 1462 | ||
1479 | 1463 | ||
1480 | #if 0 | ||
1481 | /** | ||
1482 | * acpiphp_for_each_slot - call function for each slot | ||
1483 | * @fn: callback function | ||
1484 | * @data: context to be passed to callback function | ||
1485 | */ | ||
1486 | static int acpiphp_for_each_slot(acpiphp_callback fn, void *data) | ||
1487 | { | ||
1488 | struct list_head *node; | ||
1489 | struct acpiphp_bridge *bridge; | ||
1490 | struct acpiphp_slot *slot; | ||
1491 | int retval = 0; | ||
1492 | |||
1493 | list_for_each (node, &bridge_list) { | ||
1494 | bridge = (struct acpiphp_bridge *)node; | ||
1495 | for (slot = bridge->slots; slot; slot = slot->next) { | ||
1496 | retval = fn(slot, data); | ||
1497 | if (!retval) | ||
1498 | goto err_exit; | ||
1499 | } | ||
1500 | } | ||
1501 | |||
1502 | err_exit: | ||
1503 | return retval; | ||
1504 | } | ||
1505 | #endif | ||
1506 | |||
1507 | |||
1508 | /** | 1464 | /** |
1509 | * acpiphp_enable_slot - power on slot | 1465 | * acpiphp_enable_slot - power on slot |
1510 | * @slot: ACPI PHP slot | 1466 | * @slot: ACPI PHP slot |