qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH 19/19] usb-bus: remove "init" from USBDeviceClas


From: Paolo Bonzini
Subject: Re: [Qemu-devel] [PATCH 19/19] usb-bus: remove "init" from USBDeviceClass struct
Date: Thu, 18 Sep 2014 12:16:46 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.0

Il 18/09/2014 11:33, address@hidden ha scritto:
> From: Gonglei <address@hidden>
> 
> All usb-bus devices are realized by realize(),
> remove init callback function from USBDeviceClass struct.
> 
> Signed-off-by: Gonglei <address@hidden>
> ---
>  hw/usb/bus.c     | 2 --
>  include/hw/usb.h | 2 --
>  2 files changed, 4 deletions(-)
> 
> diff --git a/hw/usb/bus.c b/hw/usb/bus.c
> index 12881cb..b375293 100644
> --- a/hw/usb/bus.c
> +++ b/hw/usb/bus.c
> @@ -113,8 +113,6 @@ static void usb_device_realize(USBDevice *dev, Error 
> **errp)
>  
>      if (klass->realize) {
>          klass->realize(dev, errp);
> -    } else if (klass->init) {
> -        klass->init(dev);
>      }
>  }
>  
> diff --git a/include/hw/usb.h b/include/hw/usb.h
> index 612f09f..8ffbba2 100644
> --- a/include/hw/usb.h
> +++ b/include/hw/usb.h
> @@ -273,8 +273,6 @@ typedef void (*USBDeviceUnrealize)(USBDevice *dev, Error 
> **errp);
>  typedef struct USBDeviceClass {
>      DeviceClass parent_class;
>  
> -    int (*init)(USBDevice *dev);
> -
>      USBDeviceRealize realize;
>      USBDeviceUnrealize unrealize;
>  
> 

Reviewed-by: Paolo Bonzini <address@hidden>



reply via email to

[Prev in Thread] Current Thread [Next in Thread]