diff mbox

[v2,15/19] dev-wacom: convert init to realize

Message ID 1411044447-3124-16-git-send-email-arei.gonglei@huawei.com
State New
Headers show

Commit Message

Gonglei (Arei) Sept. 18, 2014, 12:47 p.m. UTC
From: Gonglei <arei.gonglei@huawei.com>

Signed-off-by: Gonglei <arei.gonglei@huawei.com>
Reviewed-by: Paolo Bonzini <pbonzini@redhat.com>
---
 hw/usb/dev-wacom.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

Comments

Gerd Hoffmann Sept. 19, 2014, 6:01 a.m. UTC | #1
>  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;

The new line isn't aligned with the others (here and in lots of other
patches too).

cheers,
  Gerd
Gonglei (Arei) Sept. 19, 2014, 6:05 a.m. UTC | #2
Hi,

> From: Gerd Hoffmann [mailto:kraxel@redhat.com]

> Sent: Friday, September 19, 2014 2:02 PM

> Subject: Re: [PATCH v2 15/19] dev-wacom: convert init to realize

> 

> 

> >  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;

> 

> The new line isn't aligned with the others (here and in lots of other

> patches too).

> 

OK. I will check and fix them shortly. Thanks!

Best regards,
-Gonglei

> cheers,

>   Gerd

>
diff mbox

Patch

diff --git a/hw/usb/dev-wacom.c b/hw/usb/dev-wacom.c
index 1b73fd0..217d48e 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;