aboutsummaryrefslogtreecommitdiff
path: root/hw/usb
diff options
context:
space:
mode:
authorGonglei <arei.gonglei@huawei.com>2014-09-19 14:48:33 +0800
committerGerd Hoffmann <kraxel@redhat.com>2014-09-23 12:51:07 +0200
commit63cdca364c84f174271c7d6756091895dadd71f4 (patch)
treebc02a1c7277591f7e8413b7a893c0d440184af35 /hw/usb
parent6b7afb7f0b842018781aa26a3b325429a8c91f2a (diff)
dev-bluetooth: 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-bluetooth.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/hw/usb/dev-bluetooth.c b/hw/usb/dev-bluetooth.c
index a76e58191e..390d475c16 100644
--- a/hw/usb/dev-bluetooth.c
+++ b/hw/usb/dev-bluetooth.c
@@ -501,7 +501,7 @@ static void usb_bt_handle_destroy(USBDevice *dev)
s->hci->acl_recv = NULL;
}
-static int usb_bt_initfn(USBDevice *dev)
+static void usb_bt_realize(USBDevice *dev, Error **errp)
{
struct USBBtState *s = DO_UPCAST(struct USBBtState, dev, dev);
@@ -516,8 +516,6 @@ static int usb_bt_initfn(USBDevice *dev)
s->hci->acl_recv = usb_bt_out_hci_packet_acl;
usb_bt_handle_reset(&s->dev);
s->intr = usb_ep_get(dev, USB_TOKEN_IN, USB_EVT_EP);
-
- return 0;
}
static USBDevice *usb_bt_init(USBBus *bus, const char *cmdline)
@@ -560,7 +558,7 @@ static void usb_bt_class_initfn(ObjectClass *klass, void *data)
DeviceClass *dc = DEVICE_CLASS(klass);
USBDeviceClass *uc = USB_DEVICE_CLASS(klass);
- uc->init = usb_bt_initfn;
+ uc->realize = usb_bt_realize;
uc->product_desc = "QEMU BT dongle";
uc->usb_desc = &desc_bluetooth;
uc->handle_reset = usb_bt_handle_reset;