[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH v2 01/10] hw: Reuse TYPE_I8042 define
From: |
Bernhard Beschow |
Subject: |
[PATCH v2 01/10] hw: Reuse TYPE_I8042 define |
Date: |
Fri, 20 May 2022 20:01:00 +0200 |
TYPE_I8042 is exported, so reuse it for consistency.
Signed-off-by: Bernhard Beschow <shentey@gmail.com>
Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
---
hw/i386/pc.c | 4 ++--
hw/sparc64/sun4u.c | 2 +-
2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/hw/i386/pc.c b/hw/i386/pc.c
index 7c39c91335..c914ac0154 100644
--- a/hw/i386/pc.c
+++ b/hw/i386/pc.c
@@ -1088,7 +1088,7 @@ static void pc_superio_init(ISABus *isa_bus, bool
create_fdctrl,
return;
}
- i8042 = isa_create_simple(isa_bus, "i8042");
+ i8042 = isa_create_simple(isa_bus, TYPE_I8042);
if (!no_vmport) {
isa_create_simple(isa_bus, TYPE_VMPORT);
vmmouse = isa_try_new("vmmouse");
@@ -1096,7 +1096,7 @@ static void pc_superio_init(ISABus *isa_bus, bool
create_fdctrl,
vmmouse = NULL;
}
if (vmmouse) {
- object_property_set_link(OBJECT(vmmouse), "i8042", OBJECT(i8042),
+ object_property_set_link(OBJECT(vmmouse), TYPE_I8042, OBJECT(i8042),
&error_abort);
isa_realize_and_unref(vmmouse, isa_bus, &error_fatal);
}
diff --git a/hw/sparc64/sun4u.c b/hw/sparc64/sun4u.c
index d1bc77d27e..0e27715ac4 100644
--- a/hw/sparc64/sun4u.c
+++ b/hw/sparc64/sun4u.c
@@ -334,7 +334,7 @@ static void ebus_realize(PCIDevice *pci_dev, Error **errp)
parallel_hds_isa_init(s->isa_bus, MAX_PARALLEL_PORTS);
/* Keyboard */
- isa_create_simple(s->isa_bus, "i8042");
+ isa_create_simple(s->isa_bus, TYPE_I8042);
/* Floppy */
for (i = 0; i < MAX_FD; i++) {
--
2.36.1
- [PATCH v2 00/10] Random cleanup patches, Bernhard Beschow, 2022/05/20
- [PATCH v2 02/10] hw/audio/cs4231a: Const'ify global tables, Bernhard Beschow, 2022/05/20
- [PATCH v2 01/10] hw: Reuse TYPE_I8042 define,
Bernhard Beschow <=
- [PATCH v2 03/10] hw/i386/pc: Unexport PC_CPU_MODEL_IDS macro, Bernhard Beschow, 2022/05/20
- [PATCH v2 04/10] hw/i386/pc: Unexport functions used only internally, Bernhard Beschow, 2022/05/20
- [PATCH v2 05/10] hw/i386/pc: Remove orphan declarations, Bernhard Beschow, 2022/05/20
- [PATCH v2 06/10] hw/ppc/e500: Remove unused BINARY_DEVICE_TREE_FILE, Bernhard Beschow, 2022/05/20
- [PATCH v2 08/10] accel/tcg/cpu-exec: Unexport dump_drift_info(), Bernhard Beschow, 2022/05/20
- [PATCH v2 10/10] docs/devel: Fix link to developer mailing lists, Bernhard Beschow, 2022/05/20