diff options
| author | Bernhard Beschow <shentey@gmail.com> | 2025-01-27 10:41:29 +0100 |
|---|---|---|
| committer | Philippe Mathieu-Daudé <philmd@linaro.org> | 2025-02-16 14:25:08 +0100 |
| commit | 83f0f363e4a24b40142079ab1b328ed653f7d14b (patch) | |
| tree | 8ba675c67c70fd020f84c49ea4cb8fd4fbc4a003 /hw/usb/xen-usb.c | |
| parent | c10f4c744a7cac8be38158b0793ccf8d754cecd1 (diff) | |
| download | focaccia-qemu-83f0f363e4a24b40142079ab1b328ed653f7d14b.tar.gz focaccia-qemu-83f0f363e4a24b40142079ab1b328ed653f7d14b.zip | |
hw/xen: Prefer QOM cast for XenLegacyDevice
Makes the code less sensitive regarding changes in the class hierarchy which will be performed in the next patch. Signed-off-by: Bernhard Beschow <shentey@gmail.com> Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org> Message-ID: <20250127094129.15941-1-shentey@gmail.com> Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Diffstat (limited to 'hw/usb/xen-usb.c')
| -rw-r--r-- | hw/usb/xen-usb.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/hw/usb/xen-usb.c b/hw/usb/xen-usb.c index 13b065b0fa..fa46a7da01 100644 --- a/hw/usb/xen-usb.c +++ b/hw/usb/xen-usb.c @@ -755,10 +755,10 @@ static void usbback_portid_add(struct usbback_info *usbif, unsigned port, qdict = qdict_new(); qdict_put_str(qdict, "driver", "usb-host"); - tmp = g_strdup_printf("%s.0", usbif->xendev.qdev.id); + tmp = g_strdup_printf("%s.0", DEVICE(&usbif->xendev)->id); qdict_put_str(qdict, "bus", tmp); g_free(tmp); - tmp = g_strdup_printf("%s-%u", usbif->xendev.qdev.id, port); + tmp = g_strdup_printf("%s-%u", DEVICE(&usbif->xendev)->id, port); qdict_put_str(qdict, "id", tmp); g_free(tmp); qdict_put_int(qdict, "port", port); @@ -1022,7 +1022,7 @@ static void usbback_alloc(struct XenLegacyDevice *xendev) usbif = container_of(xendev, struct usbback_info, xendev); usb_bus_new(&usbif->bus, sizeof(usbif->bus), &xen_usb_bus_ops, - DEVICE(&xendev->qdev)); + DEVICE(xendev)); for (i = 0; i < USBBACK_MAXPORTS; i++) { p = &(usbif->ports[i].port); usb_register_port(&usbif->bus, p, usbif, i, &xen_usb_port_ops, |