diff options
author | Jiang Liu <jiang.liu@huawei.com> | 2013-05-28 18:31:27 -0600 |
---|---|---|
committer | Bjorn Helgaas <bhelgaas@google.com> | 2013-05-29 14:35:40 -0600 |
commit | bfe2414aecca03d884f680d5cf1d612c7813ee33 (patch) | |
tree | dad1c4455cc4aa60c1c32ed4b3f8be9bd39d9230 /drivers/acpi/pci_root.c | |
parent | 516ca22307df6ba972e9719ec756a356187cdde7 (diff) | |
download | blackbird-op-linux-bfe2414aecca03d884f680d5cf1d612c7813ee33.tar.gz blackbird-op-linux-bfe2414aecca03d884f680d5cf1d612c7813ee33.zip |
PCI/ACPI: Introduce "handle" local for economy of expression
[bhelgaas: split out from acpi_handle_printk() changes]
Signed-off-by: Jiang Liu <jiang.liu@huawei.com>
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
Diffstat (limited to 'drivers/acpi/pci_root.c')
-rw-r--r-- | drivers/acpi/pci_root.c | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/drivers/acpi/pci_root.c b/drivers/acpi/pci_root.c index eb09053c0fce..852fb96f94e5 100644 --- a/drivers/acpi/pci_root.c +++ b/drivers/acpi/pci_root.c @@ -382,13 +382,14 @@ static int acpi_pci_root_add(struct acpi_device *device, int result; struct acpi_pci_root *root; u32 flags, base_flags; + acpi_handle handle = device->handle; root = kzalloc(sizeof(struct acpi_pci_root), GFP_KERNEL); if (!root) return -ENOMEM; segment = 0; - status = acpi_evaluate_integer(device->handle, METHOD_NAME__SEG, NULL, + status = acpi_evaluate_integer(handle, METHOD_NAME__SEG, NULL, &segment); if (ACPI_FAILURE(status) && status != AE_NOT_FOUND) { printk(KERN_ERR PREFIX "can't evaluate _SEG\n"); @@ -398,7 +399,7 @@ static int acpi_pci_root_add(struct acpi_device *device, /* Check _CRS first, then _BBN. If no _BBN, default to zero. */ root->secondary.flags = IORESOURCE_BUS; - status = try_get_root_bridge_busnr(device->handle, &root->secondary); + status = try_get_root_bridge_busnr(handle, &root->secondary); if (ACPI_FAILURE(status)) { /* * We need both the start and end of the downstream bus range @@ -409,7 +410,7 @@ static int acpi_pci_root_add(struct acpi_device *device, root->secondary.end = 0xFF; printk(KERN_WARNING FW_BUG PREFIX "no secondary bus range in _CRS\n"); - status = acpi_evaluate_integer(device->handle, METHOD_NAME__BBN, + status = acpi_evaluate_integer(handle, METHOD_NAME__BBN, NULL, &bus); if (ACPI_SUCCESS(status)) root->secondary.start = bus; @@ -433,7 +434,7 @@ static int acpi_pci_root_add(struct acpi_device *device, acpi_device_name(device), acpi_device_bid(device), root->segment, &root->secondary); - root->mcfg_addr = acpi_pci_root_get_mcfg_addr(device->handle); + root->mcfg_addr = acpi_pci_root_get_mcfg_addr(handle); /* * All supported architectures that use ACPI have support for @@ -502,7 +503,7 @@ static int acpi_pci_root_add(struct acpi_device *device, dev_info(&device->dev, "Requesting ACPI _OSC control (0x%02x)\n", flags); - status = acpi_pci_osc_control_set(device->handle, &flags, + status = acpi_pci_osc_control_set(handle, &flags, OSC_PCI_EXPRESS_CAP_STRUCTURE_CONTROL); if (ACPI_SUCCESS(status)) { dev_info(&device->dev, |