From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1MXzaI-0002bZ-6w for qemu-devel@nongnu.org; Mon, 03 Aug 2009 11:36:22 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1MXza6-0002JC-7z for qemu-devel@nongnu.org; Mon, 03 Aug 2009 11:36:14 -0400 Received: from [199.232.76.173] (port=39468 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MXza4-0002Gf-Fb for qemu-devel@nongnu.org; Mon, 03 Aug 2009 11:36:08 -0400 Received: from mx2.redhat.com ([66.187.237.31]:42805) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1MXza3-0004hS-G5 for qemu-devel@nongnu.org; Mon, 03 Aug 2009 11:36:07 -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 n73Fa6Z2001610 for ; Mon, 3 Aug 2009 11:36:06 -0400 From: Gerd Hoffmann Date: Mon, 3 Aug 2009 17:35:44 +0200 Message-Id: <1249313748-6459-29-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 28/32] qdev/prop: convert vga.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/vga.c | 13 +++---------- hw/vga_int.h | 4 ++-- 2 files changed, 5 insertions(+), 12 deletions(-) diff --git a/hw/vga.c b/hw/vga.c index 4d74ffe..25e5d6c 100644 --- a/hw/vga.c +++ b/hw/vga.c @@ -2533,16 +2533,9 @@ static PCIDeviceInfo vga_info = { .init = pci_vga_initfn, .config_write = pci_vga_write_config, .qdev.props = (Property[]) { - { - .name = "bios-offset", - .info = &qdev_prop_hex32, - .offset = offsetof(PCIVGAState, vga_state.bios_offset), - },{ - .name = "bios-size", - .info = &qdev_prop_hex32, - .offset = offsetof(PCIVGAState, vga_state.bios_size), - }, - {/* end of list */} + DEFINE_PROP_HEX32("bios-offset", PCIVGAState, vga_state.bios_offset, 0), + DEFINE_PROP_HEX32("bios-size", PCIVGAState, vga_state.bios_size, 0), + DEFINE_PROP_END_OF_LIST(), } }; diff --git a/hw/vga_int.h b/hw/vga_int.h index 631b1b0..651e6f3 100644 --- a/hw/vga_int.h +++ b/hw/vga_int.h @@ -107,8 +107,8 @@ typedef struct VGACommonState { uint32_t map_addr; uint32_t map_end; uint32_t lfb_vram_mapped; /* whether 0xa0000 is mapped as ram */ - unsigned long bios_offset; - unsigned int bios_size; + uint32_t bios_offset; + uint32_t bios_size; int it_shift; PCIDevice *pci_dev; uint32_t latch; -- 1.6.2.5