[PATCH 29/35] hw/usb: QOM-ify AddressSpace

Akihiko Odaki posted 35 patches 1 month, 4 weeks ago
[PATCH 29/35] hw/usb: QOM-ify AddressSpace
Posted by Akihiko Odaki 1 month, 4 weeks ago
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/usb/hcd-xhci-sysbus.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/hw/usb/hcd-xhci-sysbus.c b/hw/usb/hcd-xhci-sysbus.c
index 6d060062ab86..a078ab489c54 100644
--- a/hw/usb/hcd-xhci-sysbus.c
+++ b/hw/usb/hcd-xhci-sysbus.c
@@ -45,7 +45,7 @@ static void xhci_sysbus_realize(DeviceState *dev, Error **errp)
                              s->xhci.numintrs);
     if (s->xhci.dma_mr) {
         s->xhci.as =  g_malloc0(sizeof(AddressSpace));
-        address_space_init(s->xhci.as, NULL, s->xhci.dma_mr, NULL);
+        address_space_init(s->xhci.as, OBJECT(s), s->xhci.dma_mr, "as");
     } else {
         s->xhci.as = &address_space_memory;
     }

-- 
2.51.0