aboutsummaryrefslogtreecommitdiff
path: root/hw/scsi/spapr_vscsi.c
diff options
context:
space:
mode:
Diffstat (limited to 'hw/scsi/spapr_vscsi.c')
-rw-r--r--hw/scsi/spapr_vscsi.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/hw/scsi/spapr_vscsi.c b/hw/scsi/spapr_vscsi.c
index 57f0a1336f..c3e6d1ecef 100644
--- a/hw/scsi/spapr_vscsi.c
+++ b/hw/scsi/spapr_vscsi.c
@@ -46,6 +46,7 @@
#include "trace.h"
#include <libfdt.h>
+#include "qom/object.h"
/*
* Virtual SCSI device
@@ -90,14 +91,15 @@ typedef struct vscsi_req {
} vscsi_req;
#define TYPE_VIO_SPAPR_VSCSI_DEVICE "spapr-vscsi"
-#define VIO_SPAPR_VSCSI_DEVICE(obj) \
- OBJECT_CHECK(VSCSIState, (obj), TYPE_VIO_SPAPR_VSCSI_DEVICE)
+typedef struct VSCSIState VSCSIState;
+DECLARE_INSTANCE_CHECKER(VSCSIState, VIO_SPAPR_VSCSI_DEVICE,
+ TYPE_VIO_SPAPR_VSCSI_DEVICE)
-typedef struct {
+struct VSCSIState {
SpaprVioDevice vdev;
SCSIBus bus;
vscsi_req reqs[VSCSI_REQ_LIMIT];
-} VSCSIState;
+};
static union viosrp_iu *req_iu(vscsi_req *req)
{