aboutsummaryrefslogtreecommitdiff
path: root/hw/mips
diff options
context:
space:
mode:
authorPhilippe Mathieu-Daudé <f4bug@amsat.org>2020-10-12 17:56:40 +0200
committerPhilippe Mathieu-Daudé <f4bug@amsat.org>2020-10-17 13:59:40 +0200
commit8df525a558e85aee7a2c757dd7654173ef369544 (patch)
treec085541901ebacefd20f63ca9f572430a17a467f /hw/mips
parentc5cdf7561311a2dd37eb7af636247440182e6e0b (diff)
hw/mips/malta: Use clearer qdev style
In order to be consistent with the other code base uses, rewrite slightly how the MIPS_MALTA object is created. No logical change. Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org> Reviewed-by: Richard Henderson <richard.henderson@linaro.org> Message-Id: <20201012160503.3472140-3-f4bug@amsat.org>
Diffstat (limited to 'hw/mips')
-rw-r--r--hw/mips/malta.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/hw/mips/malta.c b/hw/mips/malta.c
index 944045d770..ff3225bb8e 100644
--- a/hw/mips/malta.c
+++ b/hw/mips/malta.c
@@ -1235,11 +1235,11 @@ void mips_malta_init(MachineState *machine)
DriveInfo *dinfo;
int fl_idx = 0;
int be;
+ MaltaState *s;
+ DeviceState *dev;
- DeviceState *dev = qdev_new(TYPE_MIPS_MALTA);
- MaltaState *s = MIPS_MALTA(dev);
-
- sysbus_realize_and_unref(SYS_BUS_DEVICE(dev), &error_fatal);
+ s = MIPS_MALTA(qdev_new(TYPE_MIPS_MALTA));
+ sysbus_realize_and_unref(SYS_BUS_DEVICE(s), &error_fatal);
/* create CPU */
mips_create_cpu(machine, s, &cbus_irq, &i8259_irq);