From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([140.186.70.92]:35358) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Rd2vH-0005Gc-Qg for qemu-devel@nongnu.org; Tue, 20 Dec 2011 11:52:21 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Rd2vG-0006UA-Gb for qemu-devel@nongnu.org; Tue, 20 Dec 2011 11:52:15 -0500 Received: from cpe-70-123-132-139.austin.res.rr.com ([70.123.132.139]:41613 helo=localhost6.localdomain6) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Rd2vG-0006U4-AK for qemu-devel@nongnu.org; Tue, 20 Dec 2011 11:52:14 -0500 From: Anthony Liguori Date: Tue, 20 Dec 2011 10:51:35 -0600 Message-Id: <1324399916-21315-7-git-send-email-aliguori@us.ibm.com> In-Reply-To: <1324399916-21315-1-git-send-email-aliguori@us.ibm.com> References: <1324399916-21315-1-git-send-email-aliguori@us.ibm.com> Subject: [Qemu-devel] [PATCH 06/27] pci: check for an initialized QOM object instead of looking for an info link List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: Paolo Bonzini , Anthony Liguori , Markus Armbruster We want to eliminate DeviceInfo so update the PCI check to look for a valid class pointer. Signed-off-by: Anthony Liguori --- hw/pci.c | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/hw/pci.c b/hw/pci.c index 4fc46c2..3ea6223 100644 --- a/hw/pci.c +++ b/hw/pci.c @@ -161,8 +161,8 @@ void pci_device_reset(PCIDevice *dev) int r; /* TODO: call the below unconditionally once all pci devices * are qdevified */ - if (qdev_get_info(&dev->qdev)) { - qdev_reset_all(&dev->qdev); + if (OBJECT(dev)->class != NULL) { + qdev_reset_all(DEVICE(dev)); } dev->irq_state = 0; -- 1.7.4.1