aboutsummaryrefslogtreecommitdiff
path: root/hw/arm/fsl-imx6.c
diff options
context:
space:
mode:
Diffstat (limited to 'hw/arm/fsl-imx6.c')
-rw-r--r--hw/arm/fsl-imx6.c13
1 files changed, 1 insertions, 12 deletions
diff --git a/hw/arm/fsl-imx6.c b/hw/arm/fsl-imx6.c
index 9dfbc9a8c4..ea14de33c6 100644
--- a/hw/arm/fsl-imx6.c
+++ b/hw/arm/fsl-imx6.c
@@ -189,18 +189,7 @@ static void fsl_imx6_realize(DeviceState *dev, Error **errp)
};
if (i < MAX_SERIAL_PORTS) {
- Chardev *chr;
-
- chr = serial_hds[i];
-
- if (!chr) {
- char *label = g_strdup_printf("imx6.uart%d", i + 1);
- chr = qemu_chr_new(label, "null");
- g_free(label);
- serial_hds[i] = chr;
- }
-
- qdev_prop_set_chr(DEVICE(&s->uart[i]), "chardev", chr);
+ qdev_prop_set_chr(DEVICE(&s->uart[i]), "chardev", serial_hds[i]);
}
object_property_set_bool(OBJECT(&s->uart[i]), true, "realized", &err);