Patchwork [30/32] qdev/prop: convert xilinx_ethlite.c to helper macros.

login
register
mail settings
Submitter Gerd Hoffmann
Date Aug. 3, 2009, 3:35 p.m.
Message ID <1249313748-6459-31-git-send-email-kraxel@redhat.com>
Download mbox | patch
Permalink /patch/30643/
State Superseded
Headers show

Comments

Gerd Hoffmann - Aug. 3, 2009, 3:35 p.m.
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
---
 hw/xilinx_ethlite.c |   15 +++------------
 1 files changed, 3 insertions(+), 12 deletions(-)

Patch

diff --git a/hw/xilinx_ethlite.c b/hw/xilinx_ethlite.c
index b3fd25b..f981d10 100644
--- a/hw/xilinx_ethlite.c
+++ b/hw/xilinx_ethlite.c
@@ -228,18 +228,9 @@  static SysBusDeviceInfo xilinx_ethlite_info = {
     .qdev.name  = "xilinx,ethlite",
     .qdev.size  = sizeof(struct xlx_ethlite),
     .qdev.props = (Property[]) {
-        {
-            .name   = "txpingpong",
-            .info   = &qdev_prop_uint32,
-            .offset = offsetof(struct xlx_ethlite, c_tx_pingpong),
-            .defval = (uint32_t[]) { 1 },
-        },{
-            .name   = "rxpingpong",
-            .info   = &qdev_prop_uint32,
-            .offset = offsetof(struct xlx_ethlite, c_rx_pingpong),
-            .defval = (uint32_t[]) { 1 },
-        },
-        {/* end of list */}
+        DEFINE_PROP_UINT32("txpingpong", struct xlx_ethlite, c_tx_pingpong, 1),
+        DEFINE_PROP_UINT32("rxpingpong", struct xlx_ethlite, c_rx_pingpong, 1),
+        DEFINE_PROP_END_OF_LIST(),
     }
 };