diff mbox

[v3,033/197] a little better approach to this

Message ID 1323721273-32404-34-git-send-email-aliguori@us.ibm.com
State New
Headers show

Commit Message

Anthony Liguori Dec. 12, 2011, 8:18 p.m. UTC
---
 hw/pci.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)
diff mbox

Patch

diff --git a/hw/pci.c b/hw/pci.c
index dd8aa48..16d676d 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)->type != 0) {
+        qdev_reset_all(DEVICE(dev));
     }
 
     dev->irq_state = 0;