qemu-commits
[Top][All Lists]
Advanced

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

[Qemu-commits] [COMMIT ea2b727] qdev/prop: convert xilinx_timer.c to hel


From: Anthony Liguori
Subject: [Qemu-commits] [COMMIT ea2b727] qdev/prop: convert xilinx_timer.c to helper macros.
Date: Mon, 10 Aug 2009 21:48:54 -0000

From: Gerd Hoffmann <address@hidden>

Signed-off-by: Gerd Hoffmann <address@hidden>
Signed-off-by: Anthony Liguori <address@hidden>
Message-Id: 

diff --git a/hw/xilinx_timer.c b/hw/xilinx_timer.c
index efb6a04..196f011 100644
--- a/hw/xilinx_timer.c
+++ b/hw/xilinx_timer.c
@@ -219,18 +219,9 @@ static SysBusDeviceInfo xilinx_timer_info = {
     .qdev.name  = "xilinx,timer",
     .qdev.size  = sizeof(struct timerblock),
     .qdev.props = (Property[]) {
-        {
-            .name   = "frequency",
-            .info   = &qdev_prop_uint32,
-            .offset = offsetof(struct timerblock, freq_hz),
-            .defval = (uint32_t[]) { 2 },
-        },{
-            .name   = "nr-timers",
-            .info   = &qdev_prop_uint32,
-            .offset = offsetof(struct timerblock, nr_timers),
-            .defval = (uint32_t[]) { 2 },
-        },
-        {/* end of list */}
+        DEFINE_PROP_UINT32("frequency", struct timerblock, freq_hz,   0),
+        DEFINE_PROP_UINT32("nr-timers", struct timerblock, nr_timers, 0),
+        DEFINE_PROP_END_OF_LIST(),
     }
 };
 




reply via email to

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