From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:59816) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XUYls-0003GV-63 for qemu-devel@nongnu.org; Thu, 18 Sep 2014 06:17:09 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XUYln-0006tR-CR for qemu-devel@nongnu.org; Thu, 18 Sep 2014 06:17:04 -0400 Received: from mx1.redhat.com ([209.132.183.28]:2440) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XUYln-0006so-6A for qemu-devel@nongnu.org; Thu, 18 Sep 2014 06:16:59 -0400 Message-ID: <541AB10E.1030004@redhat.com> Date: Thu, 18 Sep 2014 12:16:46 +0200 From: Paolo Bonzini MIME-Version: 1.0 References: <1411032780-10692-1-git-send-email-arei.gonglei@huawei.com> <1411032780-10692-20-git-send-email-arei.gonglei@huawei.com> In-Reply-To: <1411032780-10692-20-git-send-email-arei.gonglei@huawei.com> Content-Type: text/plain; charset=iso-8859-15 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH 19/19] usb-bus: remove "init" from USBDeviceClass struct List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: arei.gonglei@huawei.com, qemu-devel@nongnu.org Cc: luonengjun@huawei.com, peter.huangpeng@huawei.com, weidong.huang@huawei.com, kraxel@redhat.com, armbru@redhat.com Il 18/09/2014 11:33, arei.gonglei@huawei.com ha scritto: > From: Gonglei > > All usb-bus devices are realized by realize(), > remove init callback function from USBDeviceClass struct. > > Signed-off-by: Gonglei > --- > 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