From: Bjorn Helgaas Date: Sat, 14 Nov 2009 00:34:24 +0000 (-0700) Subject: x86/PCI: MMCONFIG: use pointer to simplify pci_mmcfg_config[] structure access X-Git-Tag: MMI-PSA29.97-13-9~25687^2~30 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=95cf1cf0c5a767feb811dfed298b95b1df8824c7;p=GitHub%2FMotorolaMobilityLLC%2Fkernel-slsi.git x86/PCI: MMCONFIG: use pointer to simplify pci_mmcfg_config[] structure access No functional change, but simplifies a future patch to convert the table to a list. Reviewed-by: Yinghai Lu Signed-off-by: Bjorn Helgaas Signed-off-by: Jesse Barnes --- diff --git a/arch/x86/pci/mmconfig-shared.c b/arch/x86/pci/mmconfig-shared.c index 5479fbb2d6ab..28ac9f58a986 100644 --- a/arch/x86/pci/mmconfig-shared.c +++ b/arch/x86/pci/mmconfig-shared.c @@ -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]; }