diff options
author | Gonglei <arei.gonglei@huawei.com> | 2014-09-19 14:48:40 +0800 |
---|---|---|
committer | Gerd Hoffmann <kraxel@redhat.com> | 2014-09-23 12:51:07 +0200 |
commit | df9bb6660d922bcd4197791bb3b2c10e49ef55de (patch) | |
tree | 2bd6eb1220f02e005a8400c7ce8ba03250191d32 /hw/usb/dev-mtp.c | |
parent | 77e35b4bbe8ac2cfa3545c9f3ad3d8716b60ddf2 (diff) |
usb-mtp: convert init to realize
Signed-off-by: Gonglei <arei.gonglei@huawei.com>
Reviewed-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Diffstat (limited to 'hw/usb/dev-mtp.c')
-rw-r--r-- | hw/usb/dev-mtp.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/hw/usb/dev-mtp.c b/hw/usb/dev-mtp.c index 0820046906..108ece8190 100644 --- a/hw/usb/dev-mtp.c +++ b/hw/usb/dev-mtp.c @@ -1060,7 +1060,7 @@ static void usb_mtp_handle_data(USBDevice *dev, USBPacket *p) } } -static int usb_mtp_initfn(USBDevice *dev) +static void usb_mtp_realize(USBDevice *dev, Error **errp) { MTPState *s = DO_UPCAST(MTPState, dev, dev); @@ -1075,7 +1075,6 @@ static int usb_mtp_initfn(USBDevice *dev) s->desc = g_strdup("none"); } } - return 0; } static const VMStateDescription vmstate_usb_mtp = { @@ -1100,7 +1099,7 @@ static void usb_mtp_class_initfn(ObjectClass *klass, void *data) DeviceClass *dc = DEVICE_CLASS(klass); USBDeviceClass *uc = USB_DEVICE_CLASS(klass); - uc->init = usb_mtp_initfn; + uc->realize = usb_mtp_realize; uc->product_desc = "QEMU USB MTP"; uc->usb_desc = &desc; uc->cancel_packet = usb_mtp_cancel_packet; |