]> Git Repo - qemu.git/commitdiff
qdev/prop: convert pci.c to helper macros.
authorGerd Hoffmann <[email protected]>
Mon, 3 Aug 2009 15:35:19 +0000 (17:35 +0200)
committerAnthony Liguori <[email protected]>
Mon, 10 Aug 2009 18:05:50 +0000 (13:05 -0500)
Signed-off-by: Gerd Hoffmann <[email protected]>
Signed-off-by: Anthony Liguori <[email protected]>
Message-Id:

hw/pci.c
hw/pci.h

index 4d0cdc7824a4da8b50f72942935b702bd830d855..27eac04b52f72e3b7c9114ef08d199627cb5da2d 100644 (file)
--- a/hw/pci.c
+++ b/hw/pci.c
@@ -60,13 +60,8 @@ static struct BusInfo pci_bus_info = {
     .size       = sizeof(PCIBus),
     .print_dev  = pcibus_dev_print,
     .props      = (Property[]) {
-        {
-            .name   = "addr",
-            .info   = &qdev_prop_pci_devfn,
-            .offset = offsetof(PCIDevice, devfn),
-            .defval = (uint32_t[]) { -1 },
-        },
-        {/* end of list */}
+        DEFINE_PROP_PCI_DEVFN("addr", PCIDevice, devfn, -1),
+        DEFINE_PROP_END_OF_LIST()
     }
 };
 
index cbfea6af69e82696a9f83259f327802003d855d5..a2ec16a3011a8ffe6ec4fbf32f76d7f24cfce106 100644 (file)
--- a/hw/pci.h
+++ b/hw/pci.h
@@ -177,7 +177,7 @@ struct PCIDevice {
 
     /* the following fields are read only */
     PCIBus *bus;
-    int devfn;
+    uint32_t devfn;
     char name[64];
     PCIIORegion io_regions[PCI_NUM_REGIONS];
 
This page took 0.030627 seconds and 4 git commands to generate.