Commit 95cf1cf0 authored by Bjorn Helgaas's avatar Bjorn Helgaas Committed by Jesse Barnes

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: default avatarYinghai Lu <yinghai@kernel.org>
Signed-off-by: default avatarBjorn Helgaas <bjorn.helgaas@hp.com>
Signed-off-by: default avatarJesse Barnes <jbarnes@virtuousgeek.org>
parent d7e6b66f
...@@ -54,12 +54,14 @@ static __init struct pci_mmcfg_region *pci_mmconfig_add(int segment, int start, ...@@ -54,12 +54,14 @@ static __init struct pci_mmcfg_region *pci_mmconfig_add(int segment, int start,
kfree(pci_mmcfg_config); kfree(pci_mmcfg_config);
} }
pci_mmcfg_config = new; pci_mmcfg_config = new;
pci_mmcfg_config_num++; pci_mmcfg_config_num++;
pci_mmcfg_config[i].address = addr;
pci_mmcfg_config[i].segment = segment; new = &pci_mmcfg_config[i];
pci_mmcfg_config[i].start_bus = start;
pci_mmcfg_config[i].end_bus = end; new->address = addr;
new->segment = segment;
new->start_bus = start;
new->end_bus = end;
return &pci_mmcfg_config[i]; return &pci_mmcfg_config[i];
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment