Patchwork [01/47] cpu: Prepare QOM realizefn

login
register
mail settings
Submitter Andreas Färber
Date Feb. 16, 2013, 3:44 p.m.
Message ID <1361029542-8412-2-git-send-email-afaerber@suse.de>
Download mbox | patch
Permalink /patch/220968/
State New
Headers show

Comments

Andreas Färber - Feb. 16, 2013, 3:44 p.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 8fb538b..870e9ba 100644
--- a/qom/cpu.c
+++ b/qom/cpu.c
@@ -46,6 +46,10 @@  static ObjectClass *cpu_common_class_by_name(const char *cpu_model)
     return NULL;
 }
 
+static void cpu_common_realizefn(DeviceState *dev, Error **errp)
+{
+}
+
 static void cpu_class_init(ObjectClass *klass, void *data)
 {
     DeviceClass *dc = DEVICE_CLASS(klass);
@@ -53,6 +57,7 @@  static void cpu_class_init(ObjectClass *klass, void *data)
 
     k->class_by_name = cpu_common_class_by_name;
     k->reset = cpu_common_reset;
+    dc->realize = cpu_common_realizefn;
     dc->no_user = 1;
 }