PCI: add acpi_find_root_bridge_handle
Consolidate finding of a root bridge and getting its handle to the one inline function. It's cut & pasted on multiple places. Use this new inline in those. Cc: kristen.c.accardi@intel.com Acked-by: Alex Chiang <achiang@hp.com> Signed-off-by: Jiri Slaby <jirislaby@gmail.com> Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
This commit is contained in:
@@ -36,12 +36,7 @@ int aer_osc_setup(struct pcie_device *pciedev)
|
||||
if (acpi_pci_disabled)
|
||||
return -1;
|
||||
|
||||
/* Find root host bridge */
|
||||
while (pdev->bus->self)
|
||||
pdev = pdev->bus->self;
|
||||
handle = acpi_get_pci_rootbridge_handle(
|
||||
pci_domain_nr(pdev->bus), pdev->bus->number);
|
||||
|
||||
handle = acpi_find_root_bridge_handle(pdev);
|
||||
if (handle) {
|
||||
pcie_osc_support_set(OSC_EXT_PCI_CONFIG_SUPPORT);
|
||||
status = pci_osc_control_set(handle,
|
||||
|
||||
Reference in New Issue
Block a user