From 934199e95d6ac28f42686fe3009877eff33e06c3 Mon Sep 17 00:00:00 2001 From: linas Date: Wed, 28 Sep 2005 19:33:38 -0500 Subject: [PATCH] ppc64 PCI Hotplug: cleanup unsymmetric API routines This is a minor patch to the ppc64 PCI hotplug code; it makes the call to rpaphp_unconfig_pci_adapter() symmetric with respect to the call to rpaphp_config_pci_adapter(). I discussed this with John Rose, who had provided the last round of changes for these functions; he appearently had this patch but somehow failed to mail it out. Tested. (added/removed device). Signed-off-by: Linas Vepstas drivers/pci/hotplug/rpaphp.h | 3 ++- drivers/pci/hotplug/rpaphp_core.c | 5 ++++- drivers/pci/hotplug/rpaphp_pci.c | 11 +++-------- 3 files changed, 9 insertions(+), 10 deletions(-) --- drivers/pci/hotplug/rpaphp_pci.c | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) (limited to 'drivers/pci/hotplug/rpaphp_pci.c') diff --git a/drivers/pci/hotplug/rpaphp_pci.c b/drivers/pci/hotplug/rpaphp_pci.c index 49e4d10a6488..46c157d26a2f 100644 --- a/drivers/pci/hotplug/rpaphp_pci.c +++ b/drivers/pci/hotplug/rpaphp_pci.c @@ -319,20 +319,15 @@ static void rpaphp_eeh_remove_bus_device(struct pci_dev *dev) return; } -int rpaphp_unconfig_pci_adapter(struct slot *slot) +int rpaphp_unconfig_pci_adapter(struct pci_bus *bus) { struct pci_dev *dev, *tmp; - int retval = 0; - list_for_each_entry_safe(dev, tmp, slot->pci_devs, bus_list) { + list_for_each_entry_safe(dev, tmp, &bus->devices, bus_list) { rpaphp_eeh_remove_bus_device(dev); pci_remove_bus_device(dev); } - - slot->state = NOT_CONFIGURED; - info("%s: devices in slot[%s] unconfigured.\n", __FUNCTION__, - slot->name); - return retval; + return 0; } static int setup_pci_hotplug_slot_info(struct slot *slot) -- cgit v1.2.1