Patchwork [06/32] qdev/prop: convert eccmemctl.c to helper macros.

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

Comments

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

Patch

diff --git a/hw/eccmemctl.c b/hw/eccmemctl.c
index dca397d..3f38477 100644
--- a/hw/eccmemctl.c
+++ b/hw/eccmemctl.c
@@ -356,13 +356,8 @@  static SysBusDeviceInfo ecc_info = {
     .qdev.name  = "eccmemctl",
     .qdev.size  = sizeof(ECCState),
     .qdev.props = (Property[]) {
-        {
-            .name   = "version",
-            .info   = &qdev_prop_hex32,
-            .offset = offsetof(ECCState, version),
-            .defval = (uint32_t[]) { -1 },
-        },
-        {/* end of list */}
+        DEFINE_PROP_HEX32("version", ECCState, version, -1),
+        DEFINE_PROP_END_OF_LIST(),
     }
 };