qemu-devel
[Top][All Lists]
Advanced

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

[Qemu-devel] [PATCH 06/27] pci: check for an initialized QOM object inst


From: Anthony Liguori
Subject: [Qemu-devel] [PATCH 06/27] pci: check for an initialized QOM object instead of looking for an info link
Date: Tue, 20 Dec 2011 10:51:35 -0600

We want to eliminate DeviceInfo so update the PCI check to look for a valid
class pointer.

Signed-off-by: Anthony Liguori <address@hidden>
---
 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




reply via email to

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