Skip to content

Commit

Permalink
x86/PCI: MMCONFIG: use pointer to simplify pci_mmcfg_config[] structu…
Browse files Browse the repository at this point in the history
…re 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>
  • Loading branch information
Bjorn Helgaas authored and Jesse Barnes committed Nov 24, 2009
1 parent d7e6b66 commit 95cf1cf
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions arch/x86/pci/mmconfig-shared.c
Original file line number Diff line number Diff line change
Expand Up @@ -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];
}
Expand Down

0 comments on commit 95cf1cf

Please sign in to comment.