Blame SOURCES/kvm-Revert-qdev-Do-not-let-the-user-try-to-device_add-wh.patch

0a122b
From 54a8632d899d7a4fa6376c5f658c0da99e9e0b78 Mon Sep 17 00:00:00 2001
0a122b
From: Markus Armbruster <armbru@redhat.com>
0a122b
Date: Fri, 17 Jan 2014 17:07:52 +0100
0a122b
Subject: [PATCH 02/11] Revert "qdev: Do not let the user try to device_add when it cannot work"
0a122b
0a122b
RH-Author: Markus Armbruster <armbru@redhat.com>
0a122b
Message-id: <1389978479-30595-3-git-send-email-armbru@redhat.com>
0a122b
Patchwork-id: 56792
0a122b
O-Subject: [PATCH 7.0 qemu-kvm 2/9] Revert "qdev: Do not let the user try to device_add when it cannot work"
0a122b
Bugzilla: 669524
0a122b
RH-Acked-by: Eduardo Habkost <ehabkost@redhat.com>
0a122b
RH-Acked-by: Michael S. Tsirkin <mst@redhat.com>
0a122b
RH-Acked-by: Marcel Apfelbaum <marcel.a@redhat.com>
0a122b
0a122b
This reverts commit de651299014ae67b110a2abbff4a9e544b215b2b.
0a122b
0a122b
This one is actually fine, but its non-trivial conflict resolution
0a122b
would cause many more conflicts in the next few patches.  I'm going to
0a122b
reapply the upstream commit in a place where it applies cleanly.
0a122b
0a122b
Signed-off-by: Markus Armbruster <armbru@redhat.com>
0a122b
---
0a122b
 qdev-monitor.c | 6 +++---
0a122b
 1 file changed, 3 insertions(+), 3 deletions(-)
0a122b
0a122b
Signed-off-by: Miroslav Rezanina <mrezanin@redhat.com>
0a122b
---
0a122b
 qdev-monitor.c |    6 +++---
0a122b
 1 files changed, 3 insertions(+), 3 deletions(-)
0a122b
0a122b
diff --git a/qdev-monitor.c b/qdev-monitor.c
0a122b
index f78ff64..d187db5 100644
0a122b
--- a/qdev-monitor.c
0a122b
+++ b/qdev-monitor.c
0a122b
@@ -477,13 +477,13 @@ DeviceState *qdev_device_add(QemuOpts *opts)
0a122b
         }
0a122b
     }
0a122b
 
0a122b
-    k = DEVICE_CLASS(obj);
0a122b
-
0a122b
-    if (!k || k->cannot_instantiate_with_device_add_yet) {
0a122b
+    if (!obj) {
0a122b
         qerror_report(QERR_INVALID_PARAMETER_VALUE, "driver", "device type");
0a122b
         return NULL;
0a122b
     }
0a122b
 
0a122b
+    k = DEVICE_CLASS(obj);
0a122b
+
0a122b
     /* find bus */
0a122b
     path = qemu_opt_get(opts, "bus");
0a122b
     if (path != NULL) {
0a122b
-- 
0a122b
1.7.1
0a122b