diff options
author | Philippe Mathieu-Daudé <philmd@redhat.com> | 2020-02-22 18:12:37 +0100 |
---|---|---|
committer | Paolo Bonzini <pbonzini@redhat.com> | 2020-03-17 15:18:49 +0100 |
commit | a8457764877c7d4070e5369e98d27876470ac6d0 (patch) | |
tree | 317c2b908a538836defe7a36e9d2c2ef7b54f930 /hw/dma/rc4030.c | |
parent | b9fc4f6e6218439684abbae863bbcb2ecef9201e (diff) | |
download | qemu-a8457764877c7d4070e5369e98d27876470ac6d0.zip qemu-a8457764877c7d4070e5369e98d27876470ac6d0.tar.gz qemu-a8457764877c7d4070e5369e98d27876470ac6d0.tar.bz2 |
hw/dma: Let devices own the MemoryRegion they create
Avoid orphan memory regions being added in the /unattached QOM
container.
This commit was produced with the Coccinelle script
scripts/coccinelle/memory-region-housekeeping.cocci.
Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Diffstat (limited to 'hw/dma/rc4030.c')
-rw-r--r-- | hw/dma/rc4030.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/hw/dma/rc4030.c b/hw/dma/rc4030.c index 21e2c36..7434d27 100644 --- a/hw/dma/rc4030.c +++ b/hw/dma/rc4030.c @@ -679,9 +679,9 @@ static void rc4030_realize(DeviceState *dev, Error **errp) s->periodic_timer = timer_new_ns(QEMU_CLOCK_VIRTUAL, rc4030_periodic_timer, s); - memory_region_init_io(&s->iomem_chipset, NULL, &rc4030_ops, s, + memory_region_init_io(&s->iomem_chipset, o, &rc4030_ops, s, "rc4030.chipset", 0x300); - memory_region_init_io(&s->iomem_jazzio, NULL, &jazzio_ops, s, + memory_region_init_io(&s->iomem_jazzio, o, &jazzio_ops, s, "rc4030.jazzio", 0x00001000); memory_region_init_iommu(&s->dma_mr, sizeof(s->dma_mr), |