diff options
author | Philippe Mathieu-Daudé | 2020-02-22 18:12:37 +0100 |
---|---|---|
committer | Paolo Bonzini | 2020-03-17 15:18:49 +0100 |
commit | a8457764877c7d4070e5369e98d27876470ac6d0 (patch) | |
tree | 317c2b908a538836defe7a36e9d2c2ef7b54f930 /hw/dma/i8257.c | |
parent | hw/display: Let devices own the MemoryRegion they create (diff) | |
download | qemu-a8457764877c7d4070e5369e98d27876470ac6d0.tar.gz qemu-a8457764877c7d4070e5369e98d27876470ac6d0.tar.xz qemu-a8457764877c7d4070e5369e98d27876470ac6d0.zip |
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/i8257.c')
-rw-r--r-- | hw/dma/i8257.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/hw/dma/i8257.c b/hw/dma/i8257.c index bad8debae4..ef15c06d77 100644 --- a/hw/dma/i8257.c +++ b/hw/dma/i8257.c @@ -553,7 +553,7 @@ static void i8257_realize(DeviceState *dev, Error **errp) I8257State *d = I8257(dev); int i; - memory_region_init_io(&d->channel_io, NULL, &channel_io_ops, d, + memory_region_init_io(&d->channel_io, OBJECT(dev), &channel_io_ops, d, "dma-chan", 8 << d->dshift); memory_region_add_subregion(isa_address_space_io(isa), d->base, &d->channel_io); |