From patchwork Tue Sep 3 12:33:08 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Paolo Bonzini X-Patchwork-Id: 272264 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [IPv6:2001:4830:134:3::11]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id 6C1A22C00A6 for ; Tue, 3 Sep 2013 23:58:26 +1000 (EST) Received: from localhost ([::1]:45557 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VGpxM-0000x9-9a for incoming@patchwork.ozlabs.org; Tue, 03 Sep 2013 08:43:40 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:52980) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VGpoH-0006ot-7E for qemu-devel@nongnu.org; Tue, 03 Sep 2013 08:34:25 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VGpo8-0006Sh-Pp for qemu-devel@nongnu.org; Tue, 03 Sep 2013 08:34:17 -0400 Received: from mail-ee0-x232.google.com ([2a00:1450:4013:c00::232]:61919) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VGpo8-0006Rd-Io for qemu-devel@nongnu.org; Tue, 03 Sep 2013 08:34:08 -0400 Received: by mail-ee0-f50.google.com with SMTP id d51so2969626eek.37 for ; Tue, 03 Sep 2013 05:34:07 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references; bh=xT11nIHgxRE18gU3gpCn6KDkDiPbgosdr1o23gniqg8=; b=QBM9IEF70oQX9SFQWRv9/7e3bV/9t6d5pGK3/EOE9pMnqfRQZQbIP5DVNKKkDjm3Oz IqJ8cJR+I7jX3ZOhtEwkkKRLupaISVs6zgfG0UfOclpv29Ffelk8mj41dpjdXKlM2VqS Gq6AtqQkBhiTu+FolIB9lQjPKiiopbTBFOv0DMenZ4H3sNyy9iXnunwt0egbv+Vfgcn+ N6sH3yBor+DxKRWkpH+4PWL26xJKei4iT3fE3aaUCbayb2rqxWq3T0Z5DoXTyvJOOqoj anCtCzUjstgqeZliURLOUI8x8hDYizwTDAjDz3/yriJHXZFJGRms8wGO+NeX1w3CJaGH l4BA== X-Received: by 10.15.64.1 with SMTP id n1mr46675006eex.15.1378211647827; Tue, 03 Sep 2013 05:34:07 -0700 (PDT) Received: from playground.lan (net-37-117-144-28.cust.dsl.vodafone.it. [37.117.144.28]) by mx.google.com with ESMTPSA id f49sm31150419eec.7.1969.12.31.16.00.00 (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Tue, 03 Sep 2013 05:34:06 -0700 (PDT) From: Paolo Bonzini To: qemu-devel@nongnu.org Date: Tue, 3 Sep 2013 14:33:08 +0200 Message-Id: <1378211609-16121-18-git-send-email-pbonzini@redhat.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1378211609-16121-1-git-send-email-pbonzini@redhat.com> References: <1378211609-16121-1-git-send-email-pbonzini@redhat.com> X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2a00:1450:4013:c00::232 Cc: mst@redhat.com Subject: [Qemu-devel] [PATCH 17/38] e1000: use instance_finalize instead of exit X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Signed-off-by: Paolo Bonzini --- hw/net/e1000.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/hw/net/e1000.c b/hw/net/e1000.c index f5ebed4..55fb062 100644 --- a/hw/net/e1000.c +++ b/hw/net/e1000.c @@ -1310,9 +1310,9 @@ e1000_cleanup(NetClientState *nc) } static void -pci_e1000_uninit(PCIDevice *dev) +pci_e1000_instance_finalize(Object *obj) { - E1000State *d = E1000(dev); + E1000State *d = E1000(obj); timer_del(d->autoneg_timer); timer_free(d->autoneg_timer); @@ -1394,7 +1394,6 @@ static void e1000_class_init(ObjectClass *klass, void *data) PCIDeviceClass *k = PCI_DEVICE_CLASS(klass); k->init = pci_e1000_init; - k->exit = pci_e1000_uninit; k->romfile = "efi-e1000.rom"; k->vendor_id = PCI_VENDOR_ID_INTEL; k->device_id = E1000_DEVID; @@ -1412,6 +1411,7 @@ static const TypeInfo e1000_info = { .parent = TYPE_PCI_DEVICE, .instance_size = sizeof(E1000State), .class_init = e1000_class_init, + .instance_finalize = pci_e1000_instance_finalize, }; static void e1000_register_types(void)