@@ -86,10 +86,8 @@ -(void)mmioWriteAtOffset:(size_t) offset value:(uint32_t)value;
typedef QTAILQ_HEAD(, AppleGFXTask) AppleGFXTaskList;
typedef struct AppleGFXState {
- /* Private */
SysBusDevice parent_obj;
- /* Public */
qemu_irq irq_gfx;
qemu_irq irq_iosfc;
MemoryRegion iomem_gfx;
@@ -562,17 +560,14 @@ static void apple_gfx_class_init(ObjectClass *klass, void *data)
dc->realize = apple_gfx_realize;
}
-static TypeInfo apple_gfx_info = {
- .name = TYPE_APPLE_GFX,
- .parent = TYPE_SYS_BUS_DEVICE,
- .instance_size = sizeof(AppleGFXState),
- .class_init = apple_gfx_class_init,
- .instance_init = apple_gfx_init,
+static TypeInfo apple_gfx_types[] = {
+ {
+ .name = TYPE_APPLE_GFX,
+ .parent = TYPE_SYS_BUS_DEVICE,
+ .instance_size = sizeof(AppleGFXState),
+ .class_init = apple_gfx_class_init,
+ .instance_init = apple_gfx_init,
+ }
};
-static void apple_gfx_register_types(void)
-{
- type_register_static(&apple_gfx_info);
-}
-
-type_init(apple_gfx_register_types)
+DEFINE_TYPES(apple_gfx_types)
Switches the device definition to the more modern macro variants. Signed-off-by: Phil Dennis-Jordan <phil@philjordan.eu> --- hw/display/apple-gfx.m | 23 +++++++++-------------- 1 file changed, 9 insertions(+), 14 deletions(-)