Patchwork qdev/prop: convert isa-bus to helper macros.

login
register
mail settings
Submitter Gerd Hoffmann
Date Aug. 11, 2009, 9:38 a.m.
Message ID <1249983510-2960-1-git-send-email-kraxel@redhat.com>
Download mbox | patch
Permalink /patch/31132/
State Superseded
Headers show

Comments

Gerd Hoffmann - Aug. 11, 2009, 9:38 a.m.
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
---
 hw/isa-bus.c |   15 +++------------
 1 files changed, 3 insertions(+), 12 deletions(-)

Patch

diff --git a/hw/isa-bus.c b/hw/isa-bus.c
index 8c14b1d..315efbb 100644
--- a/hw/isa-bus.c
+++ b/hw/isa-bus.c
@@ -29,18 +29,9 @@  static struct BusInfo isa_bus_info = {
     .name  = "ISA",
     .size  = sizeof(ISABus),
     .props = (Property[]) {
-        {
-            .name   = "iobase",
-            .info   = &qdev_prop_hex32,
-            .offset = offsetof(ISADevice, iobase[0]),
-            .defval = (uint32_t[]) { -1 },
-        },{
-            .name   = "iobase2",
-            .info   = &qdev_prop_hex32,
-            .offset = offsetof(ISADevice, iobase[1]),
-            .defval = (uint32_t[]) { -1 },
-        },
-        {/* end of list */}
+        DEFINE_PROP_HEX32("iobase",  ISADevice, iobase[0], -1),
+        DEFINE_PROP_HEX32("iobase2", ISADevice, iobase[1], -1),
+        DEFINE_PROP_END_OF_LIST(),
     }
 };