aboutsummaryrefslogtreecommitdiff
path: root/hw/usb/dev-mtp.c
diff options
context:
space:
mode:
Diffstat (limited to 'hw/usb/dev-mtp.c')
-rw-r--r--hw/usb/dev-mtp.c11
1 files changed, 4 insertions, 7 deletions
diff --git a/hw/usb/dev-mtp.c b/hw/usb/dev-mtp.c
index 326c92a..afd7944 100644
--- a/hw/usb/dev-mtp.c
+++ b/hw/usb/dev-mtp.c
@@ -123,11 +123,13 @@ typedef struct {
/* ----------------------------------------------------------------------- */
-typedef struct MTPState MTPState;
typedef struct MTPControl MTPControl;
typedef struct MTPData MTPData;
typedef struct MTPObject MTPObject;
+#define TYPE_USB_MTP "usb-mtp"
+OBJECT_DECLARE_SIMPLE_TYPE(MTPState, USB_MTP)
+
enum {
EP_DATA_IN = 1,
EP_DATA_OUT,
@@ -236,9 +238,6 @@ typedef struct {
/* string and other data follows */
} QEMU_PACKED ObjectInfo;
-#define TYPE_USB_MTP "usb-mtp"
-OBJECT_DECLARE_SIMPLE_TYPE(MTPState, USB_MTP)
-
#define QEMU_STORAGE_ID 0x00010001
#define MTP_FLAG_WRITABLE 0
@@ -1234,8 +1233,6 @@ static void usb_mtp_object_delete(MTPState *s, uint32_t handle,
default:
g_assert_not_reached();
}
-
- return;
}
static void usb_mtp_command(MTPState *s, MTPControl *c)
@@ -2084,7 +2081,7 @@ static const Property mtp_properties[] = {
DEFINE_PROP_BOOL("readonly", MTPState, readonly, true),
};
-static void usb_mtp_class_initfn(ObjectClass *klass, void *data)
+static void usb_mtp_class_initfn(ObjectClass *klass, const void *data)
{
DeviceClass *dc = DEVICE_CLASS(klass);
USBDeviceClass *uc = USB_DEVICE_CLASS(klass);