From 7085475fc42f83e926ef720ece20f9f44c3627f4 Mon Sep 17 00:00:00 2001 From: Jesper Juhl Date: Sun, 11 Dec 2005 06:43:09 +0100 Subject: [PATCH] --- yaml --- r: 17513 b: refs/heads/master c: c2dea6553090a3fd06ffa9ba512a09fdac4d1b6e h: refs/heads/master i: 17511: a670be49194ecde61f9e1cb320b022a24922673a v: v3 --- [refs] | 2 +- trunk/drivers/pci/hotplug/pciehprm_acpi.c | 13 ++++++++----- 2 files changed, 9 insertions(+), 6 deletions(-) diff --git a/[refs] b/[refs] index cc6e97f2409f..30b17ee0e880 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: f5c99dfc11dce8f26c1ceedb6595fa0eac335ea3 +refs/heads/master: c2dea6553090a3fd06ffa9ba512a09fdac4d1b6e diff --git a/trunk/drivers/pci/hotplug/pciehprm_acpi.c b/trunk/drivers/pci/hotplug/pciehprm_acpi.c index ae244e218620..2bdb30f68bf8 100644 --- a/trunk/drivers/pci/hotplug/pciehprm_acpi.c +++ b/trunk/drivers/pci/hotplug/pciehprm_acpi.c @@ -174,7 +174,9 @@ int pciehp_get_hp_hw_control_from_firmware(struct pci_dev *dev) acpi_status status; acpi_handle chandle, handle = DEVICE_ACPI_HANDLE(&(dev->dev)); struct pci_dev *pdev = dev; + struct pci_bus *parent; u8 *path_name; + /* * Per PCI firmware specification, we should run the ACPI _OSC * method to get control of hotplug hardware before using it. @@ -190,17 +192,18 @@ int pciehp_get_hp_hw_control_from_firmware(struct pci_dev *dev) */ if (!pdev || !pdev->bus->parent) break; + parent = pdev->bus->parent; dbg("Could not find %s in acpi namespace, trying parent\n", pci_name(pdev)); - if (!pdev->bus->parent->self) + if (!parent->self) /* Parent must be a host bridge */ handle = acpi_get_pci_rootbridge_handle( - pci_domain_nr(pdev->bus->parent), - pdev->bus->parent->number); + pci_domain_nr(parent), + parent->number); else handle = DEVICE_ACPI_HANDLE( - &(pdev->bus->parent->self->dev)); - pdev = pdev->bus->parent->self; + &(parent->self->dev)); + pdev = parent->self; } while (handle) {