aboutsummaryrefslogtreecommitdiff
path: root/hw/usb/dev-storage.c
diff options
context:
space:
mode:
Diffstat (limited to 'hw/usb/dev-storage.c')
-rw-r--r--hw/usb/dev-storage.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/hw/usb/dev-storage.c b/hw/usb/dev-storage.c
index 405a4ccfe7..648340323f 100644
--- a/hw/usb/dev-storage.c
+++ b/hw/usb/dev-storage.c
@@ -22,6 +22,7 @@
#include "sysemu/block-backend.h"
#include "qapi/visitor.h"
#include "qemu/cutils.h"
+#include "qom/object.h"
//#define DEBUG_MSD
@@ -50,7 +51,7 @@ struct usb_msd_csw {
uint8_t status;
};
-typedef struct {
+struct MSDState {
USBDevice dev;
enum USBMSDMode mode;
uint32_t scsi_off;
@@ -65,10 +66,12 @@ typedef struct {
BlockConf conf;
uint32_t removable;
SCSIDevice *scsi_dev;
-} MSDState;
+};
+typedef struct MSDState MSDState;
#define TYPE_USB_STORAGE "usb-storage-dev"
-#define USB_STORAGE_DEV(obj) OBJECT_CHECK(MSDState, (obj), TYPE_USB_STORAGE)
+DECLARE_INSTANCE_CHECKER(MSDState, USB_STORAGE_DEV,
+ TYPE_USB_STORAGE)
struct usb_msd_cbw {
uint32_t sig;