summary refs log tree commit diff stats
path: root/include/chardev/spice.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/chardev/spice.h')
-rw-r--r--include/chardev/spice.h9
1 files changed, 6 insertions, 3 deletions
diff --git a/include/chardev/spice.h b/include/chardev/spice.h
index 1f7339b649..99f26aedde 100644
--- a/include/chardev/spice.h
+++ b/include/chardev/spice.h
@@ -3,8 +3,9 @@
 
 #include <spice.h>
 #include "chardev/char-fe.h"
+#include "qom/object.h"
 
-typedef struct SpiceChardev {
+struct SpiceChardev {
     Chardev               parent;
 
     SpiceCharDeviceInstance sin;
@@ -13,13 +14,15 @@ typedef struct SpiceChardev {
     const uint8_t         *datapos;
     int                   datalen;
     QLIST_ENTRY(SpiceChardev) next;
-} SpiceChardev;
+};
+typedef struct SpiceChardev SpiceChardev;
 
 #define TYPE_CHARDEV_SPICE "chardev-spice"
 #define TYPE_CHARDEV_SPICEVMC "chardev-spicevmc"
 #define TYPE_CHARDEV_SPICEPORT "chardev-spiceport"
 
-#define SPICE_CHARDEV(obj) OBJECT_CHECK(SpiceChardev, (obj), TYPE_CHARDEV_SPICE)
+DECLARE_INSTANCE_CHECKER(SpiceChardev, SPICE_CHARDEV,
+                         TYPE_CHARDEV_SPICE)
 
 void qemu_chr_open_spice_port(Chardev *chr, ChardevBackend *backend,
                               bool *be_opened, Error **errp);