qdev/prop: convert isa-bus to helper macros.
authorGerd Hoffmann <kraxel@redhat.com>
Tue, 11 Aug 2009 09:38:30 +0000 (11:38 +0200)
committerAnthony Liguori <aliguori@us.ibm.com>
Mon, 24 Aug 2009 13:46:48 +0000 (08:46 -0500)
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>

hw/isa-bus.c

index 8c14b1d..315efbb 100644 (file)
@@ -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(),
     }
 };