PCI/ACPI: Introduce "handle" local for economy of expression
authorJiang Liu <jiang.liu@huawei.com>
Wed, 29 May 2013 00:31:27 +0000 (18:31 -0600)
committerBjorn Helgaas <bhelgaas@google.com>
Wed, 29 May 2013 20:35:40 +0000 (14:35 -0600)
[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>
drivers/acpi/pci_root.c

index eb09053c0fce54f2d95e45fa899182cdccb6754c..852fb96f94e5c91dbe6fc325f7370d0a978f6a9f 100644 (file)
@@ -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,
This page took 0.02576 seconds and 5 git commands to generate.