- names = (void *)&res[pci_mmcfg_config_num];
- for (i = 0; i < pci_mmcfg_config_num; i++, res++) {
- struct pci_mmcfg_region *cfg = &pci_mmcfg_config[i];
- num_buses = cfg->end_bus - cfg->start_bus + 1;
- res->name = names;
- snprintf(names, PCI_MMCFG_RESOURCE_NAME_LEN,
- "PCI MMCONFIG %u [%02x-%02x]", cfg->segment,
- cfg->start_bus, cfg->end_bus);
- res->start = cfg->address +
- PCI_MMCFG_BUS_OFFSET(cfg->start_bus);
- res->end = res->start + PCI_MMCFG_BUS_OFFSET(num_buses) - 1;
- res->flags = IORESOURCE_MEM | IORESOURCE_BUSY;
- insert_resource(&iomem_resource, res);
- names += PCI_MMCFG_RESOURCE_NAME_LEN;
+ for (i = 0; i < pci_mmcfg_config_num; i++) {
+ cfg = &pci_mmcfg_config[i];
+ insert_resource(&iomem_resource, &cfg->res);