[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH-for-5.2 6/7] hw/block/fdc: Use more descriptive TypeInfo names
From: |
Philippe Mathieu-Daudé |
Subject: |
[PATCH-for-5.2 6/7] hw/block/fdc: Use more descriptive TypeInfo names |
Date: |
Thu, 6 Aug 2020 10:08:23 +0200 |
Better name TypeInfo structures:
- ISA bus
- Common floppy controller
- Intel 82078 floppy controller
- SUN floppy controller
Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
---
hw/block/fdc.c | 18 ++++++++++--------
1 file changed, 10 insertions(+), 8 deletions(-)
diff --git a/hw/block/fdc.c b/hw/block/fdc.c
index 278220ed29..6944b06e4b 100644
--- a/hw/block/fdc.c
+++ b/hw/block/fdc.c
@@ -2930,7 +2930,7 @@ static void isabus_fdc_instance_init(Object *obj)
DEVICE(obj));
}
-static const TypeInfo isa_fdc_info = {
+static const TypeInfo isabus_fdc_info = {
.name = TYPE_ISA_FDC,
.parent = TYPE_ISA_DEVICE,
.instance_size = sizeof(FDCtrlISABus),
@@ -2971,7 +2971,7 @@ static void sysbus_fdc_class_init(ObjectClass *klass,
void *data)
set_bit(DEVICE_CATEGORY_STORAGE, dc->categories);
}
-static const TypeInfo sysbus_fdc_info = {
+static const TypeInfo sysbus_fdc_i82078_info = {
.name = "sysbus-fdc",
.parent = TYPE_SYSBUS_FDC,
.instance_init = sysbus_fdc_initfn,
@@ -2997,7 +2997,7 @@ static void sun4m_fdc_class_init(ObjectClass *klass, void
*data)
set_bit(DEVICE_CATEGORY_STORAGE, dc->categories);
}
-static const TypeInfo sun4m_fdc_info = {
+static const TypeInfo sysbus_fdc_sun4m_info = {
.name = "SUNW,fdtwo",
.parent = TYPE_SYSBUS_FDC,
.instance_init = sun4m_fdc_initfn,
@@ -3013,7 +3013,7 @@ static void sysbus_fdc_common_class_init(ObjectClass
*klass, void *data)
dc->vmsd = &vmstate_sysbus_fdc;
}
-static const TypeInfo sysbus_fdc_type_info = {
+static const TypeInfo sysbus_fdc_common_info = {
.name = TYPE_SYSBUS_FDC,
.parent = TYPE_SYS_BUS_DEVICE,
.instance_size = sizeof(FDCtrlSysBus),
@@ -3024,10 +3024,12 @@ static const TypeInfo sysbus_fdc_type_info = {
static void fdc_register_types(void)
{
- type_register_static(&isa_fdc_info);
- type_register_static(&sysbus_fdc_type_info);
- type_register_static(&sysbus_fdc_info);
- type_register_static(&sun4m_fdc_info);
+ type_register_static(&isabus_fdc_info);
+
+ type_register_static(&sysbus_fdc_common_info);
+ type_register_static(&sysbus_fdc_i82078_info);
+ type_register_static(&sysbus_fdc_sun4m_info);
+
type_register_static(&floppy_bus_info);
type_register_static(&floppy_drive_info);
}
--
2.21.3
- [PATCH-for-5.2 0/7] hw/block/fdc: Cleanups trying to make sense of the floppy controllers, Philippe Mathieu-Daudé, 2020/08/06
- [PATCH-for-5.2 1/7] hw/block/fdc: Let sector count be unsigned, Philippe Mathieu-Daudé, 2020/08/06
- [PATCH-for-5.2 2/7] hw/block/fdc: Let sector offset be unsigned, Philippe Mathieu-Daudé, 2020/08/06
- [PATCH-for-5.2 3/7] hw/block/fdc: Use warn_report() instead of debug FLOPPY_DPRINTF() calls, Philippe Mathieu-Daudé, 2020/08/06
- [PATCH-for-5.2 4/7] hw/block/fdc: Convert debug FLOPPY_DPRINTF() to trace events, Philippe Mathieu-Daudé, 2020/08/06
- [PATCH-for-5.2 5/7] hw/block/fdc: Drop pointless FLOPPY_DPRINTF() call, Philippe Mathieu-Daudé, 2020/08/06
- [PATCH-for-5.2 6/7] hw/block/fdc: Use more descriptive TypeInfo names,
Philippe Mathieu-Daudé <=
- [PATCH-for-5.2 7/7] hw/block/fdc: Add ASCII art schema of QOM relations, Philippe Mathieu-Daudé, 2020/08/06