From 9262685b818512215f0829f0dc95c2363898a1ad Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andreas=20F=C3=A4rber?= Date: Tue, 4 Mar 2014 03:17:10 +0100 Subject: cpu: Factor out cpu_generic_init() MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit All targets using it gain the ability to set -cpu name,key=value,... options via the default TYPE_CPU CPUClass::parse_features() implementation. Signed-off-by: Andreas Färber --- target-moxie/cpu.c | 13 +------------ 1 file changed, 1 insertion(+), 12 deletions(-) (limited to 'target-moxie') diff --git a/target-moxie/cpu.c b/target-moxie/cpu.c index 88b0d35c5e..32c6104950 100644 --- a/target-moxie/cpu.c +++ b/target-moxie/cpu.c @@ -136,18 +136,7 @@ static const MoxieCPUInfo moxie_cpus[] = { MoxieCPU *cpu_moxie_init(const char *cpu_model) { - MoxieCPU *cpu; - ObjectClass *oc; - - oc = moxie_cpu_class_by_name(cpu_model); - if (oc == NULL) { - return NULL; - } - cpu = MOXIE_CPU(object_new(object_class_get_name(oc))); - - object_property_set_bool(OBJECT(cpu), true, "realized", NULL); - - return cpu; + return MOXIE_CPU(cpu_generic_init(TYPE_MOXIE_CPU, cpu_model)); } static void cpu_register(const MoxieCPUInfo *info) -- cgit v1.2.1