diff options
author | Jiri Slaby <jirislaby@gmail.com> | 2008-08-18 14:22:54 -0400 |
---|---|---|
committer | Jesse Barnes <jbarnes@virtuousgeek.org> | 2008-08-18 16:48:04 -0400 |
commit | 056c58e8eb4d6765214757e541b68095e2eb2bd2 (patch) | |
tree | a6d7a8c5df552347aca6588b432b9f0ae3939a59 /drivers/pci/hotplug | |
parent | e0d94beead4ef652ec1c066be886140eebb06d8b (diff) |
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>
Diffstat (limited to 'drivers/pci/hotplug')
-rw-r--r-- | drivers/pci/hotplug/acpi_pcihp.c | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/drivers/pci/hotplug/acpi_pcihp.c b/drivers/pci/hotplug/acpi_pcihp.c index bd831970f00b..e17ef54f0efc 100644 --- a/drivers/pci/hotplug/acpi_pcihp.c +++ b/drivers/pci/hotplug/acpi_pcihp.c | |||
@@ -404,10 +404,7 @@ int acpi_get_hp_hw_control_from_firmware(struct pci_dev *dev, u32 flags) | |||
404 | * OSHP within the scope of the hotplug controller and its parents, | 404 | * OSHP within the scope of the hotplug controller and its parents, |
405 | * upto the host bridge under which this controller exists. | 405 | * upto the host bridge under which this controller exists. |
406 | */ | 406 | */ |
407 | while (pdev->bus->self) | 407 | handle = acpi_find_root_bridge_handle(pdev); |
408 | pdev = pdev->bus->self; | ||
409 | handle = acpi_get_pci_rootbridge_handle(pci_domain_nr(pdev->bus), | ||
410 | pdev->bus->number); | ||
411 | if (handle) { | 408 | if (handle) { |
412 | acpi_get_name(handle, ACPI_FULL_PATHNAME, &string); | 409 | acpi_get_name(handle, ACPI_FULL_PATHNAME, &string); |
413 | dbg("Trying to get hotplug control for %s\n", | 410 | dbg("Trying to get hotplug control for %s\n", |