mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-05 00:33:55 -06:00
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>
This commit is contained in:
parent
c10f4c744a
commit
83f0f363e4
3 changed files with 5 additions and 5 deletions
|
@ -163,7 +163,7 @@ static struct XenLegacyDevice *xen_be_get_xendev(const char *type, int dom,
|
|||
|
||||
/* init new xendev */
|
||||
xendev = g_malloc0(ops->size);
|
||||
object_initialize(&xendev->qdev, ops->size, TYPE_XENBACKEND);
|
||||
object_initialize(xendev, ops->size, TYPE_XENBACKEND);
|
||||
OBJECT(xendev)->free = g_free;
|
||||
qdev_set_id(DEVICE(xendev), g_strdup_printf("xen-%s-%d", type, dev),
|
||||
&error_fatal);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue