diff options
author | Mark Cave-Ayland | 2022-05-04 11:25:59 +0200 |
---|---|---|
committer | Mark Cave-Ayland | 2022-05-08 19:52:37 +0200 |
commit | 42cc2bf63c2b61b43300e70a4965aa9d48eda790 (patch) | |
tree | d46008f73a564b49aac4002956d6866bc0e8ee05 /hw/hppa/machine.c | |
parent | hppa: use MACHINE QOM macros for defining the hppa machine (diff) | |
download | qemu-42cc2bf63c2b61b43300e70a4965aa9d48eda790.tar.gz qemu-42cc2bf63c2b61b43300e70a4965aa9d48eda790.tar.xz qemu-42cc2bf63c2b61b43300e70a4965aa9d48eda790.zip |
hppa: fold machine_hppa_machine_init() into machine_hppa_machine_init_class_init()
There is no need for a separate function to set the machine class properties
separately from the others.
Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
Acked-by: Helge Deller <deller@gmx.de>
Message-Id: <20220504092600.10048-50-mark.cave-ayland@ilande.co.uk>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
Diffstat (limited to 'hw/hppa/machine.c')
-rw-r--r-- | hw/hppa/machine.c | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/hw/hppa/machine.c b/hw/hppa/machine.c index 2393335a64..724ee24795 100644 --- a/hw/hppa/machine.c +++ b/hw/hppa/machine.c @@ -446,8 +446,11 @@ static void hppa_nmi(NMIState *n, int cpu_index, Error **errp) } } -static void machine_hppa_machine_init(MachineClass *mc) +static void machine_hppa_machine_init_class_init(ObjectClass *oc, void *data) { + MachineClass *mc = MACHINE_CLASS(oc); + NMIClass *nc = NMI_CLASS(oc); + mc->desc = "HPPA B160L machine"; mc->default_cpu_type = TYPE_HPPA_CPU; mc->init = machine_hppa_init; @@ -459,14 +462,7 @@ static void machine_hppa_machine_init(MachineClass *mc) mc->default_ram_size = 512 * MiB; mc->default_boot_order = "cd"; mc->default_ram_id = "ram"; -} -static void machine_hppa_machine_init_class_init(ObjectClass *oc, void *data) -{ - MachineClass *mc = MACHINE_CLASS(oc); - machine_hppa_machine_init(mc); - - NMIClass *nc = NMI_CLASS(oc); nc->nmi_monitor_handler = hppa_nmi; } |