Overwrite the default implementation with a no-op, no longer
attempting to call DeviceClass::init.

Signed-off-by: Andreas Färber <afaer...@suse.de>
---
 qom/cpu.c |    5 +++++
 1 Datei geändert, 5 Zeilen hinzugefügt(+)

diff --git a/qom/cpu.c b/qom/cpu.c
index 49e5134..cbc2d01 100644
--- a/qom/cpu.c
+++ b/qom/cpu.c
@@ -34,12 +34,17 @@ static void cpu_common_reset(CPUState *cpu)
 {
 }
 
+static void cpu_common_realizefn(DeviceState *dev, Error **errp)
+{
+}
+
 static void cpu_class_init(ObjectClass *klass, void *data)
 {
     DeviceClass *dc = DEVICE_CLASS(klass);
     CPUClass *k = CPU_CLASS(klass);
 
     k->reset = cpu_common_reset;
+    dc->realize = cpu_common_realizefn;
     dc->no_user = 1;
 }
 
-- 
1.7.10.4


Reply via email to