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 <od...@rsg.ci.i.u-tokyo.ac.jp>
---
 hw/i2c/aspeed_i2c.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/hw/i2c/aspeed_i2c.c b/hw/i2c/aspeed_i2c.c
index 9d216b3f0ea3..d1d980a8961f 100644
--- a/hw/i2c/aspeed_i2c.c
+++ b/hw/i2c/aspeed_i2c.c
@@ -1253,8 +1253,7 @@ static void aspeed_i2c_realize(DeviceState *dev, Error 
**errp)
             return;
         }
 
-        address_space_init(&s->dram_as, NULL, s->dram_mr,
-                           TYPE_ASPEED_I2C "-dma-dram");
+        address_space_init(&s->dram_as, OBJECT(s), s->dram_mr, "as");
     }
 }
 

-- 
2.51.0


Reply via email to