Make AddressSpaces QOM objects to ensure that they are destroyed when
their owners are finalized and also to get a unique path for debugging
output.
The name arguments were used to distinguish AddresSpaces in debugging
output, but they will represent property names after QOM-ification and
debugging output will show QOM paths. So change them to make them more
concise and also avoid conflicts with other properties.
Signed-off-by: Akihiko Odaki <odaki@rsg.ci.i.u-tokyo.ac.jp>
---
hw/display/artist.c | 2 +-
hw/display/bcm2835_fb.c | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/hw/display/artist.c b/hw/display/artist.c
index 42905563ad49..b47ca875f93a 100644
--- a/hw/display/artist.c
+++ b/hw/display/artist.c
@@ -1391,7 +1391,7 @@ static void artist_realizefn(DeviceState *dev, Error **errp)
}
memory_region_init(&s->mem_as_root, OBJECT(dev), "artist", ~0ull);
- address_space_init(&s->as, NULL, &s->mem_as_root, "artist");
+ address_space_init(&s->as, OBJECT(s), &s->mem_as_root, "as");
artist_create_buffer(s, "cmap", &offset, ARTIST_BUFFER_CMAP, 2048, 4);
artist_create_buffer(s, "ap", &offset, ARTIST_BUFFER_AP,
diff --git a/hw/display/bcm2835_fb.c b/hw/display/bcm2835_fb.c
index c6710bdc0700..cc1567895522 100644
--- a/hw/display/bcm2835_fb.c
+++ b/hw/display/bcm2835_fb.c
@@ -421,7 +421,7 @@ static void bcm2835_fb_realize(DeviceState *dev, Error **errp)
s->initial_config.base = s->vcram_base + BCM2835_FB_OFFSET;
s->dma_mr = MEMORY_REGION(obj);
- address_space_init(&s->dma_as, NULL, s->dma_mr, TYPE_BCM2835_FB "-memory");
+ address_space_init(&s->dma_as, OBJECT(s), s->dma_mr, "as");
bcm2835_fb_reset(dev);
--
2.51.0