summary refs log tree commit diff stats
path: root/hw/syborg_timer.c
diff options
context:
space:
mode:
authorGerd Hoffmann <kraxel@redhat.com>2009-06-10 09:41:42 +0200
committerPaul Brook <paul@codesourcery.com>2009-06-11 13:47:36 +0100
commit074f2fff798cb8f9588080b740dc356217a24720 (patch)
tree4a7267d64bbe8d679627699b6545c9fcd23bb270 /hw/syborg_timer.c
parent57b452a8487df30d084ce2b56a993ba7473469e3 (diff)
downloadfocaccia-qemu-074f2fff798cb8f9588080b740dc356217a24720.tar.gz
focaccia-qemu-074f2fff798cb8f9588080b740dc356217a24720.zip
qdev: move name+size into DeviceInfo (v2)
Rationale: move device information from code to data structures.

v2: Adapt the drivers missed in the first version.

Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Diffstat (limited to 'hw/syborg_timer.c')
-rw-r--r--hw/syborg_timer.c13
1 files changed, 6 insertions, 7 deletions
diff --git a/hw/syborg_timer.c b/hw/syborg_timer.c
index b833330e5b..b6d7f0cd45 100644
--- a/hw/syborg_timer.c
+++ b/hw/syborg_timer.c
@@ -228,18 +228,17 @@ static void syborg_timer_init(SysBusDevice *dev)
 
 static SysBusDeviceInfo syborg_timer_info = {
     .init = syborg_timer_init,
-    .qdev = {
-        .props = (DevicePropList[]) {
-              {.name = "frequency", .type = PROP_TYPE_INT},
-              {.name = NULL}
-        }
+    .qdev.name  = "syborg,timer",
+    .qdev.size  = sizeof(SyborgTimerState),
+    .qdev.props = (DevicePropList[]) {
+        {.name = "frequency", .type = PROP_TYPE_INT},
+        {.name = NULL}
     }
 };
 
 static void syborg_timer_register_devices(void)
 {
-    sysbus_register_withprop("syborg,timer", sizeof(SyborgTimerState),
-                            &syborg_timer_info);
+    sysbus_register_withprop(&syborg_timer_info);
 }
 
 device_init(syborg_timer_register_devices)