x86/PCI: MMCONFIG: use pointer to simplify pci_mmcfg_config[] structure access
authorBjorn Helgaas <bjorn.helgaas@hp.com>
Sat, 14 Nov 2009 00:34:24 +0000 (17:34 -0700)
committerJesse Barnes <jbarnes@virtuousgeek.org>
Tue, 24 Nov 2009 23:29:34 +0000 (15:29 -0800)
No functional change, but simplifies a future patch to convert the table
to a list.

Reviewed-by: Yinghai Lu <yinghai@kernel.org>
Signed-off-by: Bjorn Helgaas <bjorn.helgaas@hp.com>
Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
arch/x86/pci/mmconfig-shared.c

index 5479fbb2d6abd0c47171fd112b88e2c64e951583..28ac9f58a986263bb7a6d20ce144836bc1571f4e 100644 (file)
@@ -54,12 +54,14 @@ static __init struct pci_mmcfg_region *pci_mmconfig_add(int segment, int start,
                kfree(pci_mmcfg_config);
        }
        pci_mmcfg_config = new;
-
        pci_mmcfg_config_num++;
-       pci_mmcfg_config[i].address = addr;
-       pci_mmcfg_config[i].segment = segment;
-       pci_mmcfg_config[i].start_bus = start;
-       pci_mmcfg_config[i].end_bus = end;
+
+       new = &pci_mmcfg_config[i];
+
+       new->address = addr;
+       new->segment = segment;
+       new->start_bus = start;
+       new->end_bus = end;
 
        return &pci_mmcfg_config[i];
 }