Skip to content

Commit

Permalink
PCI: rpaphp: Use pcibios_remove_pci_devices() symmetrically
Browse files Browse the repository at this point in the history
At first blush, the disable_slot() routine does not look
at all like its symmetric with the enable_slot() routine;
as it seems to call a very different set of routines.
However, this is easily fixed: pcibios_remove_pci_devices()
does the right thing.

Signed-off-by: Linas Vepstas <linas@austin.ibm.com>
Cc: John Rose <johnrose@austin.ibm.com>
Signed-off-by: Kristen Carlson Accardi <kristen.c.accardi@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
  • Loading branch information
Linas Vepstas authored and Greg Kroah-Hartman committed May 3, 2007
1 parent da65944 commit e70ea26
Showing 1 changed file with 2 additions and 8 deletions.
10 changes: 2 additions & 8 deletions drivers/pci/hotplug/rpaphp_core.c
Original file line number Diff line number Diff line change
Expand Up @@ -424,18 +424,12 @@ static int enable_slot(struct hotplug_slot *hotplug_slot)
return retval;
}

static int __disable_slot(struct slot *slot)
static inline int __disable_slot(struct slot *slot)
{
struct pci_dev *dev, *tmp;

if (slot->state == NOT_CONFIGURED)
return -EINVAL;

list_for_each_entry_safe(dev, tmp, &slot->bus->devices, bus_list) {
eeh_remove_bus_device(dev);
pci_remove_bus_device(dev);
}

pcibios_remove_pci_devices(slot->bus);
slot->state = NOT_CONFIGURED;
return 0;
}
Expand Down

0 comments on commit e70ea26

Please sign in to comment.