Commit 84845c07 authored by Kenji Kaneshige's avatar Kenji Kaneshige Committed by Jesse Barnes

PCI: use pci_is_root_bus() in acpi_pci_get_bridge_handle()

Use pci_is_root_bus() in acpi_pci_get_bridge_handle() to check if the
pci bus is root, for code consistency.
Reviewed-by: default avatarGrant Grundler <grundler@parisc-linux.org>
Reviewed-by: default avatarAlex Chiang <achiang@hp.com>
Signed-off-by: default avatarKenji Kaneshige <kaneshige.kenji@jp.fujitsu.com>
Signed-off-by: default avatarJesse Barnes <jbarnes@virtuousgeek.org>
parent 74c57428
...@@ -23,7 +23,7 @@ static inline acpi_handle acpi_find_root_bridge_handle(struct pci_dev *pdev) ...@@ -23,7 +23,7 @@ static inline acpi_handle acpi_find_root_bridge_handle(struct pci_dev *pdev)
static inline acpi_handle acpi_pci_get_bridge_handle(struct pci_bus *pbus) static inline acpi_handle acpi_pci_get_bridge_handle(struct pci_bus *pbus)
{ {
if (pbus->parent) if (!pci_is_root_bus(pbus))
return DEVICE_ACPI_HANDLE(&(pbus->self->dev)); return DEVICE_ACPI_HANDLE(&(pbus->self->dev));
return acpi_get_pci_rootbridge_handle(pci_domain_nr(pbus), return acpi_get_pci_rootbridge_handle(pci_domain_nr(pbus),
pbus->number); pbus->number);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment