aboutsummaryrefslogtreecommitdiff
path: root/hw/cirrus_vga.c
diff options
context:
space:
mode:
authorIsaku Yamahata <yamahata@valinux.co.jp>2009-10-30 21:20:58 +0900
committerAnthony Liguori <aliguori@us.ibm.com>2009-11-09 08:43:04 -0600
commit182f9c8a64d530d992df35a1a4b17a562c7d1aef (patch)
tree5edad9c70d781f9ea77dcb715d288b575351adf9 /hw/cirrus_vga.c
parent2217dcfff5e24a16217cba5e53c3579f97d8880e (diff)
downloadqemu-182f9c8a64d530d992df35a1a4b17a562c7d1aef.zip
qemu-182f9c8a64d530d992df35a1a4b17a562c7d1aef.tar.gz
qemu-182f9c8a64d530d992df35a1a4b17a562c7d1aef.tar.bz2
pci: define a constant to represent a unmapped bar and use it.
define a constant to represent a unmapped bar instead of -1 and use it. Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp> Acked-by: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Diffstat (limited to 'hw/cirrus_vga.c')
-rw-r--r--hw/cirrus_vga.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/hw/cirrus_vga.c b/hw/cirrus_vga.c
index f4c9cdf..eee66b1 100644
--- a/hw/cirrus_vga.c
+++ b/hw/cirrus_vga.c
@@ -3210,7 +3210,7 @@ static void pci_cirrus_write_config(PCIDevice *d,
CirrusVGAState *s = &pvs->cirrus_vga;
pci_default_write_config(d, address, val, len);
- if (s->vga.map_addr && d->io_regions[0].addr == -1)
+ if (s->vga.map_addr && d->io_regions[0].addr == PCI_BAR_UNMAPPED)
s->vga.map_addr = 0;
cirrus_update_memory_access(s);
}