aboutsummaryrefslogtreecommitdiff
path: root/hw/usb
diff options
context:
space:
mode:
authorGonglei <arei.gonglei@huawei.com>2014-09-19 14:48:31 +0800
committerGerd Hoffmann <kraxel@redhat.com>2014-09-23 12:51:07 +0200
commitb89dc7e33fa7ef04d9aa69ce3a9317a0acfcbc19 (patch)
tree00028865d5a55f4f8e0eb6e63b4d40ef9fac762b /hw/usb
parentf5dc59787849d135c5e24752379b5e487b6523cc (diff)
downloadqemu-b89dc7e33fa7ef04d9aa69ce3a9317a0acfcbc19.zip
qemu-b89dc7e33fa7ef04d9aa69ce3a9317a0acfcbc19.tar.gz
qemu-b89dc7e33fa7ef04d9aa69ce3a9317a0acfcbc19.tar.bz2
dev-uas: 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')
-rw-r--r--hw/usb/dev-uas.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/hw/usb/dev-uas.c b/hw/usb/dev-uas.c
index 9832385..a97a02f 100644
--- a/hw/usb/dev-uas.c
+++ b/hw/usb/dev-uas.c
@@ -892,7 +892,7 @@ static void usb_uas_handle_destroy(USBDevice *dev)
qemu_bh_delete(uas->status_bh);
}
-static int usb_uas_init(USBDevice *dev)
+static void usb_uas_realize(USBDevice *dev, Error **errp)
{
UASDevice *uas = DO_UPCAST(UASDevice, dev, dev);
@@ -905,8 +905,6 @@ static int usb_uas_init(USBDevice *dev)
scsi_bus_new(&uas->bus, sizeof(uas->bus), DEVICE(dev),
&usb_uas_scsi_info, NULL);
-
- return 0;
}
static const VMStateDescription vmstate_usb_uas = {
@@ -928,7 +926,7 @@ static void usb_uas_class_initfn(ObjectClass *klass, void *data)
DeviceClass *dc = DEVICE_CLASS(klass);
USBDeviceClass *uc = USB_DEVICE_CLASS(klass);
- uc->init = usb_uas_init;
+ uc->realize = usb_uas_realize;
uc->product_desc = desc_strings[STR_PRODUCT];
uc->usb_desc = &desc;
uc->cancel_packet = usb_uas_cancel_io;