From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:36539) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bmj6r-0008IF-5D for qemu-devel@nongnu.org; Wed, 21 Sep 2016 11:06:54 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bmj6l-0000e4-5B for qemu-devel@nongnu.org; Wed, 21 Sep 2016 11:06:52 -0400 From: Laurent Vivier Date: Wed, 21 Sep 2016 17:06:40 +0200 Message-Id: <1474470400-29503-1-git-send-email-lvivier@redhat.com> Subject: [Qemu-devel] [PATCH] ppc: QOMified g3beige machine List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: agraf@suse.de Cc: david@gibson.dropbear.id.au, qemu-ppc@nongnu.org, qemu-devel@nongnu.org, Laurent Vivier Signed-off-by: Laurent Vivier --- hw/ppc/mac_oldworld.c | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) diff --git a/hw/ppc/mac_oldworld.c b/hw/ppc/mac_oldworld.c index 4479487..16a9600 100644 --- a/hw/ppc/mac_oldworld.c +++ b/hw/ppc/mac_oldworld.c @@ -363,8 +363,10 @@ static int heathrow_kvm_type(const char *arg) return 2; } -static void heathrow_machine_init(MachineClass *mc) +static void heathrow_machine_class_init(ObjectClass *oc, void *data) { + MachineClass *mc = MACHINE_CLASS(oc); + mc->desc = "Heathrow based PowerMAC"; mc->init = ppc_heathrow_init; mc->max_cpus = MAX_CPUS; @@ -376,4 +378,15 @@ static void heathrow_machine_init(MachineClass *mc) mc->kvm_type = heathrow_kvm_type; } -DEFINE_MACHINE("g3beige", heathrow_machine_init) +static const TypeInfo heathrow_machine_info = { + .name = MACHINE_TYPE_NAME("g3beige"), + .parent = TYPE_MACHINE, + .class_init = heathrow_machine_class_init, +}; + +static void heathrow_machine_register_types(void) +{ + type_register_static(&heathrow_machine_info); +} + +type_init(heathrow_machine_register_types) -- 2.5.5