aboutsummaryrefslogtreecommitdiff
path: root/hw/sd/ssi-sd.c
diff options
context:
space:
mode:
Diffstat (limited to 'hw/sd/ssi-sd.c')
-rw-r--r--hw/sd/ssi-sd.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/hw/sd/ssi-sd.c b/hw/sd/ssi-sd.c
index a7ef9cb922..dd07258d4e 100644
--- a/hw/sd/ssi-sd.c
+++ b/hw/sd/ssi-sd.c
@@ -18,6 +18,7 @@
#include "hw/sd/sd.h"
#include "qapi/error.h"
#include "qemu/module.h"
+#include "qom/object.h"
//#define DEBUG_SSI_SD 1
@@ -40,7 +41,7 @@ typedef enum {
SSI_SD_DATA_READ,
} ssi_sd_mode;
-typedef struct {
+struct ssi_sd_state {
SSISlave ssidev;
uint32_t mode;
int cmd;
@@ -50,10 +51,12 @@ typedef struct {
int32_t response_pos;
int32_t stopping;
SDBus sdbus;
-} ssi_sd_state;
+};
+typedef struct ssi_sd_state ssi_sd_state;
#define TYPE_SSI_SD "ssi-sd"
-#define SSI_SD(obj) OBJECT_CHECK(ssi_sd_state, (obj), TYPE_SSI_SD)
+DECLARE_INSTANCE_CHECKER(ssi_sd_state, SSI_SD,
+ TYPE_SSI_SD)
/* State word bits. */
#define SSI_SDR_LOCKED 0x0001