diff options
author | Gonglei <arei.gonglei@huawei.com> | 2014-09-19 14:48:37 +0800 |
---|---|---|
committer | Gerd Hoffmann <kraxel@redhat.com> | 2014-09-23 12:51:07 +0200 |
commit | 27107d416e7c0b37252f5475641f0ca51036915c (patch) | |
tree | 3e5bce02aad8e6d93c07a77bd3432e0bd2c4f054 /hw/usb/dev-wacom.c | |
parent | 276b7ac8e9f508c91ecc59b848add33781724d0e (diff) |
dev-wacom: 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-wacom.c')
-rw-r--r-- | hw/usb/dev-wacom.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/hw/usb/dev-wacom.c b/hw/usb/dev-wacom.c index 1b73fd0aab..844eafadf7 100644 --- a/hw/usb/dev-wacom.c +++ b/hw/usb/dev-wacom.c @@ -335,14 +335,13 @@ static void usb_wacom_handle_destroy(USBDevice *dev) } } -static int usb_wacom_initfn(USBDevice *dev) +static void usb_wacom_realize(USBDevice *dev, Error **errp) { USBWacomState *s = DO_UPCAST(USBWacomState, dev, dev); usb_desc_create_serial(dev); usb_desc_init(dev); s->intr = usb_ep_get(dev, USB_TOKEN_IN, 1); s->changed = 1; - return 0; } static const VMStateDescription vmstate_usb_wacom = { @@ -357,7 +356,7 @@ static void usb_wacom_class_init(ObjectClass *klass, void *data) uc->product_desc = "QEMU PenPartner Tablet"; uc->usb_desc = &desc_wacom; - uc->init = usb_wacom_initfn; + uc->realize = usb_wacom_realize; uc->handle_reset = usb_wacom_handle_reset; uc->handle_control = usb_wacom_handle_control; uc->handle_data = usb_wacom_handle_data; |