diff options
author | Bjorn Helgaas <bjorn.helgaas@hp.com> | 2009-11-13 19:33:47 -0500 |
---|---|---|
committer | Jesse Barnes <jbarnes@virtuousgeek.org> | 2009-11-24 18:28:43 -0500 |
commit | d3578ef7aab5b9bb874d085609b3ed5d9abffc48 (patch) | |
tree | 5efdd7e4174cedab509a69851f5269f2523c664b /arch/x86/pci/mmconfig-shared.c | |
parent | e823d6ff581c5d1d76aa8c73a202d7d1419d34b8 (diff) |
x86/PCI: MMCONFIG: step through MCFG table, not pci_mmcfg_config[]
Step through the ACPI MCFG table, not pci_mmcfg_config[]. No functional
change, but simplifies future patches that encapsulate pci_mmcfg_config[].
Reviewed-by: Yinghai Lu <yinghai@kernel.org>
Signed-off-by: Bjorn Helgaas <bjorn.helgaas@hp.com>
Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
Diffstat (limited to 'arch/x86/pci/mmconfig-shared.c')
-rw-r--r-- | arch/x86/pci/mmconfig-shared.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/arch/x86/pci/mmconfig-shared.c b/arch/x86/pci/mmconfig-shared.c index fbadb89c71eb..7a7b6ba3abbb 100644 --- a/arch/x86/pci/mmconfig-shared.c +++ b/arch/x86/pci/mmconfig-shared.c | |||
@@ -554,6 +554,7 @@ static int __init acpi_mcfg_check_entry(struct acpi_table_mcfg *mcfg, | |||
554 | static int __init pci_parse_mcfg(struct acpi_table_header *header) | 554 | static int __init pci_parse_mcfg(struct acpi_table_header *header) |
555 | { | 555 | { |
556 | struct acpi_table_mcfg *mcfg; | 556 | struct acpi_table_mcfg *mcfg; |
557 | struct acpi_mcfg_allocation *cfg_table, *cfg; | ||
557 | unsigned long i; | 558 | unsigned long i; |
558 | int entries, config_size; | 559 | int entries, config_size; |
559 | 560 | ||
@@ -586,8 +587,10 @@ static int __init pci_parse_mcfg(struct acpi_table_header *header) | |||
586 | memcpy(pci_mmcfg_config, &mcfg[1], config_size); | 587 | memcpy(pci_mmcfg_config, &mcfg[1], config_size); |
587 | pci_mmcfg_config_num = entries; | 588 | pci_mmcfg_config_num = entries; |
588 | 589 | ||
590 | cfg_table = (struct acpi_mcfg_allocation *) &mcfg[1]; | ||
589 | for (i = 0; i < entries; i++) { | 591 | for (i = 0; i < entries; i++) { |
590 | if (acpi_mcfg_check_entry(mcfg, &pci_mmcfg_config[i])) { | 592 | cfg = &cfg_table[i]; |
593 | if (acpi_mcfg_check_entry(mcfg, cfg)) { | ||
591 | kfree(pci_mmcfg_config); | 594 | kfree(pci_mmcfg_config); |
592 | pci_mmcfg_config_num = 0; | 595 | pci_mmcfg_config_num = 0; |
593 | return -ENODEV; | 596 | return -ENODEV; |