qdev/prop: convert syborg_fb.c to helper macros.
authorGerd Hoffmann <kraxel@redhat.com>
Mon, 3 Aug 2009 15:35:37 +0000 (17:35 +0200)
committerAnthony Liguori <aliguori@us.ibm.com>
Mon, 10 Aug 2009 18:11:25 +0000 (13:11 -0500)
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Message-Id:

hw/syborg_fb.c

index 2929ffd..efa5c0e 100644 (file)
@@ -535,16 +535,9 @@ static SysBusDeviceInfo syborg_fb_info = {
     .qdev.name  = "syborg,framebuffer",
     .qdev.size  = sizeof(SyborgFBState),
     .qdev.props = (Property[]) {
-        {
-            .name   = "width",
-            .info   = &qdev_prop_uint32,
-            .offset = offsetof(SyborgFBState, cols),
-        },{
-            .name   = "height",
-            .info   = &qdev_prop_uint32,
-            .offset = offsetof(SyborgFBState, rows),
-        },
-        {/* end of list */}
+        DEFINE_PROP_UINT32("width",  SyborgFBState, cols, 0),
+        DEFINE_PROP_UINT32("height", SyborgFBState, rows, 0),
+        DEFINE_PROP_END_OF_LIST(),
     }
 };