Received: from eggs.gnu.org ([2001:4830:134:3::10]:53284) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VGpom-0007ng-PR for qemu-devel@nongnu.org; Tue, 03 Sep 2013 08:34:57 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VGpod-0006aj-Mm for qemu-devel@nongnu.org; Tue, 03 Sep 2013 08:34:48 -0400 Received: from mail-ee0-x229.google.com ([2a00:1450:4013:c00::229]:52156) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VGpod-0006aT-Eq for qemu-devel@nongnu.org; Tue, 03 Sep 2013 08:34:39 -0400 Received: by mail-ee0-f41.google.com with SMTP id d17so2991044eek.28 for ; Tue, 03 Sep 2013 05:34:38 -0700 (PDT) Sender: Paolo Bonzini From: Paolo Bonzini Date: Tue, 3 Sep 2013 14:33:25 +0200 Message-Id: <1378211609-16121-35-git-send-email-pbonzini@redhat.com> In-Reply-To: <1378211609-16121-1-git-send-email-pbonzini@redhat.com> References: <1378211609-16121-1-git-send-email-pbonzini@redhat.com> Subject: [Qemu-devel] [PATCH 34/38] usb-uhci: use instance_finalize instead of exit List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: mst@redhat.com Signed-off-by: Paolo Bonzini --- hw/usb/hcd-uhci.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/hw/usb/hcd-uhci.c b/hw/usb/hcd-uhci.c index 578b949..821838a 100644 --- a/hw/usb/hcd-uhci.c +++ b/hw/usb/hcd-uhci.c @@ -1292,8 +1292,9 @@ static int usb_uhci_vt82c686b_initfn(PCIDevice *dev) return usb_uhci_common_initfn(dev); } -static void usb_uhci_exit(PCIDevice *dev) +static void usb_uhci_instance_finalize(Object *obj) { + PCIDevice *dev = PCI_DEVICE(obj); UHCIState *s = DO_UPCAST(UHCIState, dev, dev); memory_region_destroy(&s->io_bar); @@ -1315,7 +1316,6 @@ static void uhci_class_init(ObjectClass *klass, void *data) UHCIInfo *info = data; k->init = info->initfn ? info->initfn : usb_uhci_common_initfn; - k->exit = info->unplug ? usb_uhci_exit : NULL; k->vendor_id = info->vendor_id; k->device_id = info->device_id; k->revision = info->revision; @@ -1402,6 +1402,7 @@ static void uhci_register_types(void) .instance_size = sizeof(UHCIState), .class_size = sizeof(UHCIPCIDeviceClass), .class_init = uhci_class_init, + .instance_finalize = usb_uhci_instance_finalize, }; int i; -- 1.8.3.1