Skip to content

Commit

Permalink
cpu: Prepare QOM realizefn
Browse files Browse the repository at this point in the history
Overwrite the default implementation with a no-op, no longer
attempting to call DeviceClass::init.

Signed-off-by: Andreas Färber <afaerber@suse.de>
  • Loading branch information
afaerber committed Feb 16, 2013
1 parent 453776e commit 4f65809
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions qom/cpu.c
Expand Up @@ -46,13 +46,18 @@ 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);
CPUClass *k = CPU_CLASS(klass);

k->class_by_name = cpu_common_class_by_name;
k->reset = cpu_common_reset;
dc->realize = cpu_common_realizefn;
dc->no_user = 1;
}

Expand Down

0 comments on commit 4f65809

Please sign in to comment.