From 8b881e776a45cc1ee18f4bc8182bbc1d2aed56e8 Mon Sep 17 00:00:00 2001 From: Avi Kivity Date: Thu, 11 Aug 2011 14:40:58 +0300 Subject: pci: simplify memory region registration The two code paths (for ADDRESS_SPACE_IO and ADDRESS_SPACE_MEM) are identical. Unify them. Signed-off-by: Avi Kivity --- hw/pci.c | 13 ++----------- 1 file changed, 2 insertions(+), 11 deletions(-) (limited to 'hw') diff --git a/hw/pci.c b/hw/pci.c index 749e8d86ca..e8cc1b046f 100644 --- a/hw/pci.c +++ b/hw/pci.c @@ -998,17 +998,8 @@ static void pci_update_mappings(PCIDevice *d) } r->addr = new_addr; if (r->addr != PCI_BAR_UNMAPPED) { - if (r->type & PCI_BASE_ADDRESS_SPACE_IO) { - memory_region_add_subregion_overlap(r->address_space, - r->addr, - r->memory, - 1); - } else { - memory_region_add_subregion_overlap(r->address_space, - r->addr, - r->memory, - 1); - } + memory_region_add_subregion_overlap(r->address_space, + r->addr, r->memory, 1); } } } -- cgit v1.2.1