summary refs log tree commit diff stats
path: root/backends/tpm/tpm_passthrough.c
diff options
context:
space:
mode:
Diffstat (limited to 'backends/tpm/tpm_passthrough.c')
-rw-r--r--backends/tpm/tpm_passthrough.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/backends/tpm/tpm_passthrough.c b/backends/tpm/tpm_passthrough.c
index 7403807ec4..10722e0a41 100644
--- a/backends/tpm/tpm_passthrough.c
+++ b/backends/tpm/tpm_passthrough.c
@@ -33,10 +33,12 @@
 #include "qapi/clone-visitor.h"
 #include "qapi/qapi-visit-tpm.h"
 #include "trace.h"
+#include "qom/object.h"
 
 #define TYPE_TPM_PASSTHROUGH "tpm-passthrough"
-#define TPM_PASSTHROUGH(obj) \
-    OBJECT_CHECK(TPMPassthruState, (obj), TYPE_TPM_PASSTHROUGH)
+typedef struct TPMPassthruState TPMPassthruState;
+DECLARE_INSTANCE_CHECKER(TPMPassthruState, TPM_PASSTHROUGH,
+                         TYPE_TPM_PASSTHROUGH)
 
 /* data structures */
 struct TPMPassthruState {
@@ -53,7 +55,6 @@ struct TPMPassthruState {
     size_t tpm_buffersize;
 };
 
-typedef struct TPMPassthruState TPMPassthruState;
 
 #define TPM_PASSTHROUGH_DEFAULT_DEVICE "/dev/tpm0"