hw/misc/vmcoreinfo: Declare QOM type using DEFINE_TYPES macro

Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
Message-Id: <20241219153857.57450-2-philmd@linaro.org>
This commit is contained in:
Philippe Mathieu-Daudé 2024-12-19 14:30:35 +01:00
parent 5a7b6029c1
commit 3154922c7f

View file

@ -93,16 +93,13 @@ static void vmcoreinfo_device_class_init(ObjectClass *klass, void *data)
set_bit(DEVICE_CATEGORY_MISC, dc->categories); set_bit(DEVICE_CATEGORY_MISC, dc->categories);
} }
static const TypeInfo vmcoreinfo_device_info = { static const TypeInfo vmcoreinfo_types[] = {
.name = VMCOREINFO_DEVICE, {
.parent = TYPE_DEVICE, .name = VMCOREINFO_DEVICE,
.instance_size = sizeof(VMCoreInfoState), .parent = TYPE_DEVICE,
.class_init = vmcoreinfo_device_class_init, .instance_size = sizeof(VMCoreInfoState),
.class_init = vmcoreinfo_device_class_init,
}
}; };
static void vmcoreinfo_register_types(void) DEFINE_TYPES(vmcoreinfo_types)
{
type_register_static(&vmcoreinfo_device_info);
}
type_init(vmcoreinfo_register_types)