summary refs log tree commit diff stats
path: root/hw/display/vhost-user-vga.c
diff options
context:
space:
mode:
Diffstat (limited to 'hw/display/vhost-user-vga.c')
-rw-r--r--hw/display/vhost-user-vga.c12
1 files changed, 7 insertions, 5 deletions
diff --git a/hw/display/vhost-user-vga.c b/hw/display/vhost-user-vga.c
index 1690f6b610..a34a99856d 100644
--- a/hw/display/vhost-user-vga.c
+++ b/hw/display/vhost-user-vga.c
@@ -11,17 +11,19 @@
 #include "qemu/osdep.h"
 #include "qapi/error.h"
 #include "virtio-vga.h"
+#include "qom/object.h"
 
 #define TYPE_VHOST_USER_VGA "vhost-user-vga"
 
-#define VHOST_USER_VGA(obj)                                \
-    OBJECT_CHECK(VhostUserVGA, (obj), TYPE_VHOST_USER_VGA)
+typedef struct VhostUserVGA VhostUserVGA;
+DECLARE_INSTANCE_CHECKER(VhostUserVGA, VHOST_USER_VGA,
+                         TYPE_VHOST_USER_VGA)
 
-typedef struct VhostUserVGA {
+struct VhostUserVGA {
     VirtIOVGABase parent_obj;
 
     VhostUserGPU vdev;
-} VhostUserVGA;
+};
 
 static void vhost_user_vga_inst_initfn(Object *obj)
 {
@@ -39,7 +41,7 @@ static void vhost_user_vga_inst_initfn(Object *obj)
 static const VirtioPCIDeviceTypeInfo vhost_user_vga_info = {
     .generic_name  = TYPE_VHOST_USER_VGA,
     .parent        = TYPE_VIRTIO_VGA_BASE,
-    .instance_size = sizeof(struct VhostUserVGA),
+    .instance_size = sizeof(VhostUserVGA),
     .instance_init = vhost_user_vga_inst_initfn,
 };