[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH 03/32] qdev/prop: convert pci.c to helper macros.
From: |
Gerd Hoffmann |
Subject: |
[Qemu-devel] [PATCH 03/32] qdev/prop: convert pci.c to helper macros. |
Date: |
Mon, 3 Aug 2009 17:35:19 +0200 |
Signed-off-by: Gerd Hoffmann <address@hidden>
---
hw/pci.c | 9 ++-------
hw/pci.h | 2 +-
2 files changed, 3 insertions(+), 8 deletions(-)
diff --git a/hw/pci.c b/hw/pci.c
index 4d0cdc7..27eac04 100644
--- 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()
}
};
diff --git a/hw/pci.h b/hw/pci.h
index cbfea6a..a2ec16a 100644
--- 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];
--
1.6.2.5
- [Qemu-devel] [PATCH 00/32] qdev: macros for creating typechecked properties., Gerd Hoffmann, 2009/08/03
- [Qemu-devel] [PATCH 03/32] qdev/prop: convert pci.c to helper macros.,
Gerd Hoffmann <=
- [Qemu-devel] [PATCH 05/32] qdev/prop: convert armv7m.c to helper macros., Gerd Hoffmann, 2009/08/03
- [Qemu-devel] [PATCH 02/32] qdev/prop: add CharDriverState property., Gerd Hoffmann, 2009/08/03
- [Qemu-devel] [PATCH 14/32] qdev/prop: convert qdev.c to helper macros., Gerd Hoffmann, 2009/08/03
- [Qemu-devel] [PATCH 01/32] qdev/prop: macros for creating typechecked properties., Gerd Hoffmann, 2009/08/03
- [Qemu-devel] [PATCH 06/32] qdev/prop: convert eccmemctl.c to helper macros., Gerd Hoffmann, 2009/08/03
- [Qemu-devel] [PATCH 10/32] qdev/prop: convert integratorcp.c to helper macros., Gerd Hoffmann, 2009/08/03
- [Qemu-devel] [PATCH 24/32] qdev/prop: convert syborg_pointer.c to helper macros., Gerd Hoffmann, 2009/08/03
- [Qemu-devel] [PATCH 08/32] qdev/prop: convert etraxfs_pic.c to helper macros., Gerd Hoffmann, 2009/08/03