qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-devel] [PATCH 12/32] qdev/prop: convert m48t59.c to helper macros.


From: Gerd Hoffmann
Subject: [Qemu-devel] [PATCH 12/32] qdev/prop: convert m48t59.c to helper macros.
Date: Mon, 3 Aug 2009 17:35:28 +0200

Signed-off-by: Gerd Hoffmann <address@hidden>
---
 hw/m48t59.c |   20 ++++----------------
 1 files changed, 4 insertions(+), 16 deletions(-)

diff --git a/hw/m48t59.c b/hw/m48t59.c
index 7e53dce..6541cbe 100644
--- a/hw/m48t59.c
+++ b/hw/m48t59.c
@@ -668,22 +668,10 @@ static SysBusDeviceInfo m48t59_info = {
     .qdev.name  = "m48t59",
     .qdev.size  = sizeof(m48t59_t),
     .qdev.props = (Property[]) {
-        {
-            .name   = "size",
-            .info   = &qdev_prop_uint32,
-            .offset = offsetof(m48t59_t, size),
-            .defval = (uint32_t[]) { -1 },
-        },{
-            .name   = "type",
-            .info   = &qdev_prop_uint32,
-            .offset = offsetof(m48t59_t, type),
-            .defval = (uint32_t[]) { -1 },
-        },{
-            .name   = "io_base",
-            .info   = &qdev_prop_hex32,
-            .offset = offsetof(m48t59_t, io_base),
-        },
-        {/* end of list */}
+        DEFINE_PROP_UINT32("size",    m48t59_t, size,    -1),
+        DEFINE_PROP_UINT32("type",    m48t59_t, type,    -1),
+        DEFINE_PROP_HEX32( "io_base", m48t59_t, io_base,  0),
+        DEFINE_PROP_END_OF_LIST(),
     }
 };
 
-- 
1.6.2.5





reply via email to

[Prev in Thread] Current Thread [Next in Thread]