Patchwork [RFC,qom-cpu,v2,01/28] cpu: Prepare QOM realizefn

login
register
mail settings
Submitter Andreas Färber
Date Jan. 20, 2013, 7:22 a.m.
Message ID <1358666571-1737-2-git-send-email-afaerber@suse.de>
Download mbox | patch
Permalink /patch/213916/
State New
Headers show

Comments

Andreas Färber - Jan. 20, 2013, 7:22 a.m.
Overwrite the default implementation with a no-op, no longer
attempting to call DeviceClass::init.

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

Patch

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;
 }