summary refs log tree commit diff stats
path: root/include/hw/s390x/tod.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/hw/s390x/tod.h')
-rw-r--r--include/hw/s390x/tod.h11
1 files changed, 7 insertions, 4 deletions
diff --git a/include/hw/s390x/tod.h b/include/hw/s390x/tod.h
index 4251623f7f..e240faf11c 100644
--- a/include/hw/s390x/tod.h
+++ b/include/hw/s390x/tod.h
@@ -13,6 +13,7 @@
 
 #include "hw/qdev-core.h"
 #include "target/s390x/s390-tod.h"
+#include "qom/object.h"
 
 typedef struct S390TOD {
     uint8_t high;
@@ -20,6 +21,8 @@ typedef struct S390TOD {
 } S390TOD;
 
 #define TYPE_S390_TOD "s390-tod"
+typedef struct S390TODClass S390TODClass;
+typedef struct S390TODState S390TODState;
 #define S390_TOD(obj) OBJECT_CHECK(S390TODState, (obj), TYPE_S390_TOD)
 #define S390_TOD_CLASS(oc) OBJECT_CLASS_CHECK(S390TODClass, (oc), \
                                               TYPE_S390_TOD)
@@ -28,7 +31,7 @@ typedef struct S390TOD {
 #define TYPE_KVM_S390_TOD TYPE_S390_TOD "-kvm"
 #define TYPE_QEMU_S390_TOD TYPE_S390_TOD "-qemu"
 
-typedef struct S390TODState {
+struct S390TODState {
     /* private */
     DeviceState parent_obj;
 
@@ -39,9 +42,9 @@ typedef struct S390TODState {
     S390TOD base;
     /* Used by KVM to remember if the TOD is stopped and base is valid. */
     bool stopped;
-} S390TODState;
+};
 
-typedef struct S390TODClass {
+struct S390TODClass {
     /* private */
     DeviceClass parent_class;
     void (*parent_realize)(DeviceState *dev, Error **errp);
@@ -49,7 +52,7 @@ typedef struct S390TODClass {
     /* public */
     void (*get)(const S390TODState *td, S390TOD *tod, Error **errp);
     void (*set)(S390TODState *td, const S390TOD *tod, Error **errp);
-} S390TODClass;
+};
 
 void s390_init_tod(void);
 S390TODState *s390_get_todstate(void);