]> git.proxmox.com Git - qemu.git/blobdiff - hw/etraxfs_eth.c
qdev: register all types natively through QEMU Object Model
[qemu.git] / hw / etraxfs_eth.c
index 92c822bcd98e661e94fe9bdee3c303ca8bce7856..aefd5778ab03c89b4278882e57a420877150160e 100644 (file)
@@ -623,21 +623,23 @@ static Property etraxfs_eth_properties[] = {
 
 static void etraxfs_eth_class_init(ObjectClass *klass, void *data)
 {
+    DeviceClass *dc = DEVICE_CLASS(klass);
     SysBusDeviceClass *k = SYS_BUS_DEVICE_CLASS(klass);
 
     k->init = fs_eth_init;
+    dc->props = etraxfs_eth_properties;
 }
 
-static DeviceInfo etraxfs_eth_info = {
-    .name = "etraxfs-eth",
-    .size = sizeof(struct fs_eth),
-    .props = etraxfs_eth_properties,
-    .class_init = etraxfs_eth_class_init,
+static TypeInfo etraxfs_eth_info = {
+    .name          = "etraxfs-eth",
+    .parent        = TYPE_SYS_BUS_DEVICE,
+    .instance_size = sizeof(struct fs_eth),
+    .class_init    = etraxfs_eth_class_init,
 };
 
 static void etraxfs_eth_register(void)
 {
-       sysbus_register_withprop(&etraxfs_eth_info);
+    type_register_static(&etraxfs_eth_info);
 }
 
 device_init(etraxfs_eth_register)