summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBjorn Helgaas <bjorn.helgaas@hp.com>2009-11-13 17:34:24 -0700
committerJesse Barnes <jbarnes@virtuousgeek.org>2009-11-24 15:29:34 -0800
commit95cf1cf0c5a767feb811dfed298b95b1df8824c7 (patch)
tree3aead3f6f02fd07e569299db04848703d73ef833
parentd7e6b66fe87c9f42480d73fc314aecaeae84ca6b (diff)
downloadkernel-crypto-95cf1cf0c5a767feb811dfed298b95b1df8824c7.tar.gz
kernel-crypto-95cf1cf0c5a767feb811dfed298b95b1df8824c7.tar.xz
kernel-crypto-95cf1cf0c5a767feb811dfed298b95b1df8824c7.zip
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 <yinghai@kernel.org> Signed-off-by: Bjorn Helgaas <bjorn.helgaas@hp.com> Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
-rw-r--r--arch/x86/pci/mmconfig-shared.c12
1 files changed, 7 insertions, 5 deletions
diff --git a/arch/x86/pci/mmconfig-shared.c b/arch/x86/pci/mmconfig-shared.c
index 5479fbb2d6a..28ac9f58a98 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];
}