qemu-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-commits] [COMMIT df59cbc] qdev/prop: convert vga.c to helper macro


From: Anthony Liguori
Subject: [Qemu-commits] [COMMIT df59cbc] qdev/prop: convert vga.c to helper macros.
Date: Mon, 10 Aug 2009 21:48:53 -0000

From: Gerd Hoffmann <address@hidden>

Signed-off-by: Gerd Hoffmann <address@hidden>
Signed-off-by: Anthony Liguori <address@hidden>
Message-Id: 

diff --git a/hw/vga.c b/hw/vga.c
index 53b5ff6..4a0f197 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 8fdf51d..eb2d6ea 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;




reply via email to

[Prev in Thread] Current Thread [Next in Thread]