Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit e70ea263 authored by Linas Vepstas's avatar Linas Vepstas Committed by Greg Kroah-Hartman
Browse files

PCI: rpaphp: Use pcibios_remove_pci_devices() symmetrically



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: default avatarLinas Vepstas <linas@austin.ibm.com>
Cc: John Rose <johnrose@austin.ibm.com>
Signed-off-by: default avatarKristen Carlson Accardi <kristen.c.accardi@intel.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
parent da65944b
Loading
Loading
Loading
Loading
+2 −8
Original line number Original line Diff line number Diff line
@@ -424,18 +424,12 @@ static int enable_slot(struct hotplug_slot *hotplug_slot)
	return retval;
	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)
	if (slot->state == NOT_CONFIGURED)
		return -EINVAL;
		return -EINVAL;


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

	slot->state = NOT_CONFIGURED;
	slot->state = NOT_CONFIGURED;
	return 0;
	return 0;
}
}