aboutsummaryrefslogtreecommitdiff
path: root/hw/isa
diff options
context:
space:
mode:
authorPaolo Bonzini <pbonzini@redhat.com>2013-07-02 13:40:48 +0200
committerPaolo Bonzini <pbonzini@redhat.com>2013-07-04 17:42:45 +0200
commit3ce10901ca8da9142dcdcde198fda1a4c290934c (patch)
tree1d2e886c106132afbdb9901db62062fbc525a5d7 /hw/isa
parent46637be269aaaceb9867ffdf176e906401138fff (diff)
memory: introduce memory_region_present
This new API will avoid having too many memory_region_ref/unref in paths that currently use memory_region_find. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'hw/isa')
-rw-r--r--hw/isa/lpc_ich9.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/hw/isa/lpc_ich9.c b/hw/isa/lpc_ich9.c
index 82f8ea6264..f704c420f7 100644
--- a/hw/isa/lpc_ich9.c
+++ b/hw/isa/lpc_ich9.c
@@ -481,19 +481,19 @@ static void ich9_lpc_machine_ready(Notifier *n, void *opaque)
uint8_t *pci_conf;
pci_conf = s->d.config;
- if (memory_region_find(io_as, 0x3f8, 1).mr) {
+ if (memory_region_present(io_as, 0x3f8)) {
/* com1 */
pci_conf[0x82] |= 0x01;
}
- if (memory_region_find(io_as, 0x2f8, 1).mr) {
+ if (memory_region_present(io_as, 0x2f8)) {
/* com2 */
pci_conf[0x82] |= 0x02;
}
- if (memory_region_find(io_as, 0x378, 1).mr) {
+ if (memory_region_present(io_as, 0x378)) {
/* lpt */
pci_conf[0x82] |= 0x04;
}
- if (memory_region_find(io_as, 0x3f0, 1).mr) {
+ if (memory_region_present(io_as, 0x3f0)) {
/* floppy */
pci_conf[0x82] |= 0x08;
}