]> Git Repo - qemu.git/blobdiff - hw/apic_common.c
qdev: register all types natively through QEMU Object Model
[qemu.git] / hw / apic_common.c
index 9a3b1c512d19c7ddf6941904559eb4c50c19d244..26991b451603d8d11e2bda5d015fcbc74466a73f 100644 (file)
@@ -295,7 +295,12 @@ static Property apic_properties_common[] = {
 static void apic_common_class_init(ObjectClass *klass, void *data)
 {
     SysBusDeviceClass *sc = SYS_BUS_DEVICE_CLASS(klass);
+    DeviceClass *dc = DEVICE_CLASS(klass);
 
+    dc->vmsd = &vmstate_apic_common;
+    dc->reset = apic_reset_common;
+    dc->no_user = 1;
+    dc->props = apic_properties_common;
     sc->init = apic_init_common;
 }
 
@@ -308,16 +313,6 @@ static TypeInfo apic_common_type = {
     .abstract = true,
 };
 
-void apic_qdev_register(DeviceInfo *info)
-{
-    info->size = sizeof(APICCommonState),
-    info->vmsd = &vmstate_apic_common;
-    info->reset = apic_reset_common;
-    info->no_user = 1;
-    info->props = apic_properties_common;
-    sysbus_qdev_register_subclass(info, TYPE_APIC_COMMON);
-}
-
 static void register_devices(void)
 {
     type_register_static(&apic_common_type);
This page took 0.024222 seconds and 4 git commands to generate.