]> git.proxmox.com Git - mirror_qemu.git/blobdiff - include/hw/scsi/scsi.h
Move QOM typedefs and add missing includes
[mirror_qemu.git] / include / hw / scsi / scsi.h
index 2fc23e44baf4e294e766866d6a3aac360c373cb8..bad4dfb2239cfc7f5763264d04d4809c58894cde 100644 (file)
@@ -6,6 +6,7 @@
 #include "hw/qdev-core.h"
 #include "scsi/utils.h"
 #include "qemu/notify.h"
+#include "qom/object.h"
 
 #define MAX_SCSI_DEVS  255
 
@@ -49,6 +50,7 @@ struct SCSIRequest {
 };
 
 #define TYPE_SCSI_DEVICE "scsi-device"
+typedef struct SCSIDeviceClass SCSIDeviceClass;
 #define SCSI_DEVICE(obj) \
      OBJECT_CHECK(SCSIDevice, (obj), TYPE_SCSI_DEVICE)
 #define SCSI_DEVICE_CLASS(klass) \
@@ -56,7 +58,7 @@ struct SCSIRequest {
 #define SCSI_DEVICE_GET_CLASS(obj) \
      OBJECT_GET_CLASS(SCSIDeviceClass, (obj), TYPE_SCSI_DEVICE)
 
-typedef struct SCSIDeviceClass {
+struct SCSIDeviceClass {
     DeviceClass parent_class;
     void (*realize)(SCSIDevice *dev, Error **errp);
     void (*unrealize)(SCSIDevice *dev);
@@ -65,7 +67,7 @@ typedef struct SCSIDeviceClass {
     SCSIRequest *(*alloc_req)(SCSIDevice *s, uint32_t tag, uint32_t lun,
                               uint8_t *buf, void *hba_private);
     void (*unit_attention_reported)(SCSIDevice *s);
-} SCSIDeviceClass;
+};
 
 struct SCSIDevice
 {