ACPI / hotplug / PCI: Simplify disable_slot()
authorRafael J. Wysocki <rafael.j.wysocki@intel.com>
Mon, 3 Feb 2014 23:37:02 +0000 (00:37 +0100)
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>
Wed, 5 Feb 2014 16:40:24 +0000 (17:40 +0100)
commit1c0c5443de5f1f03ae2abce569fb673377f0fd0e
tree62222070f5db7109408148498eea7f34e8d64be1
parentaf9d8adc6b832003bbe3d83fde665ae6b4f072eb
ACPI / hotplug / PCI: Simplify disable_slot()

After recent PCI core changes related to the rescan/remove locking,
the ACPIPHP's disable_slot() function is only called under the
general PCI rescan/remove lock, so it doesn't have to use
dev_in_slot() any more to avoid race conditions.  Make it simply
walk the devices on the bus and drop the ones in the slot being
disabled and drop dev_in_slot() which has no more users.

Moreover, to avoid problems described in the changelog of commit
29ed1f29b68a (PCI: pciehp: Fix null pointer deref when hot-removing
SR-IOV device), make disable_slot() carry out the list walk in
reverse order.

Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Tested-by: Mika Westerberg <mika.westerberg@linux.intel.com>
drivers/pci/hotplug/acpiphp_glue.c
This page took 0.025413 seconds and 5 git commands to generate.