From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:39428) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XWOyv-0005sV-Gw for qemu-devel@nongnu.org; Tue, 23 Sep 2014 08:14:15 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XWOyo-0002Al-7I for qemu-devel@nongnu.org; Tue, 23 Sep 2014 08:14:09 -0400 Received: from mx1.redhat.com ([209.132.183.28]:57351) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XWOyn-00029U-Vi for qemu-devel@nongnu.org; Tue, 23 Sep 2014 08:14:02 -0400 From: Gerd Hoffmann Date: Tue, 23 Sep 2014 14:13:24 +0200 Message-Id: <1411474417-9704-14-git-send-email-kraxel@redhat.com> In-Reply-To: <1411474417-9704-1-git-send-email-kraxel@redhat.com> References: <1411474417-9704-1-git-send-email-kraxel@redhat.com> Subject: [Qemu-devel] [PULL 13/26] dev-bluetooth: convert init to realize List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: Gonglei , Gerd Hoffmann From: Gonglei Signed-off-by: Gonglei Reviewed-by: Paolo Bonzini Signed-off-by: Gerd Hoffmann --- hw/usb/dev-bluetooth.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/hw/usb/dev-bluetooth.c b/hw/usb/dev-bluetooth.c index a76e581..390d475 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; -- 1.8.3.1