From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1MXzaG-0002b1-U9 for qemu-devel@nongnu.org; Mon, 03 Aug 2009 11:36:21 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1MXzZz-00027k-Mt for qemu-devel@nongnu.org; Mon, 03 Aug 2009 11:36:08 -0400 Received: from [199.232.76.173] (port=39450 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MXzZy-00025n-Be for qemu-devel@nongnu.org; Mon, 03 Aug 2009 11:36:02 -0400 Received: from mx2.redhat.com ([66.187.237.31]:42777) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1MXzZw-0004fY-K7 for qemu-devel@nongnu.org; Mon, 03 Aug 2009 11:36:00 -0400 Received: from int-mx2.corp.redhat.com (int-mx2.corp.redhat.com [172.16.27.26]) by mx2.redhat.com (8.13.8/8.13.8) with ESMTP id n73Fa0xq001516 for ; Mon, 3 Aug 2009 11:36:00 -0400 From: Gerd Hoffmann Date: Mon, 3 Aug 2009 17:35:28 +0200 Message-Id: <1249313748-6459-13-git-send-email-kraxel@redhat.com> In-Reply-To: <1249313748-6459-1-git-send-email-kraxel@redhat.com> References: <1249313748-6459-1-git-send-email-kraxel@redhat.com> Subject: [Qemu-devel] [PATCH 12/32] qdev/prop: convert m48t59.c to helper macros. List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: Gerd Hoffmann Signed-off-by: Gerd Hoffmann --- hw/m48t59.c | 20 ++++---------------- 1 files changed, 4 insertions(+), 16 deletions(-) diff --git a/hw/m48t59.c b/hw/m48t59.c index 7e53dce..6541cbe 100644 --- a/hw/m48t59.c +++ b/hw/m48t59.c @@ -668,22 +668,10 @@ static SysBusDeviceInfo m48t59_info = { .qdev.name = "m48t59", .qdev.size = sizeof(m48t59_t), .qdev.props = (Property[]) { - { - .name = "size", - .info = &qdev_prop_uint32, - .offset = offsetof(m48t59_t, size), - .defval = (uint32_t[]) { -1 }, - },{ - .name = "type", - .info = &qdev_prop_uint32, - .offset = offsetof(m48t59_t, type), - .defval = (uint32_t[]) { -1 }, - },{ - .name = "io_base", - .info = &qdev_prop_hex32, - .offset = offsetof(m48t59_t, io_base), - }, - {/* end of list */} + DEFINE_PROP_UINT32("size", m48t59_t, size, -1), + DEFINE_PROP_UINT32("type", m48t59_t, type, -1), + DEFINE_PROP_HEX32( "io_base", m48t59_t, io_base, 0), + DEFINE_PROP_END_OF_LIST(), } }; -- 1.6.2.5