summaryrefslogtreecommitdiffstats
path: root/hw/pci_internals.h
diff options
context:
space:
mode:
authorAnthony Liguori2012-05-02 09:00:20 +0200
committerAndreas Färber2012-06-18 15:14:38 +0200
commit0d936928ef87ca1bb7b41b5b89c400c699a7691c (patch)
tree134a900379f06e1e84f31728a866d8afc7e9869a /hw/pci_internals.h
parentqdev: Move SysBus initialization to sysbus.c (diff)
downloadqemu-0d936928ef87ca1bb7b41b5b89c400c699a7691c.tar.gz
qemu-0d936928ef87ca1bb7b41b5b89c400c699a7691c.tar.xz
qemu-0d936928ef87ca1bb7b41b5b89c400c699a7691c.zip
qdev: Convert busses to QEMU Object Model
This is far less interesting than it sounds. We simply add an Object to each BusState and then register the types appropriately. Most of the interesting refactoring will follow in the next patches. Since we're changing fundamental type names (BusInfo -> BusClass), it all needs to convert at once. Fortunately, not a lot of code is affected. Signed-off-by: Anthony Liguori <aliguori@us.ibm.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> [AF: Made all new bus TypeInfos static const.] [AF: Made qbus_free() call object_delete(), required {qom,glib}_allocated] Signed-off-by: Andreas Färber <afaerber@suse.de>
Diffstat (limited to 'hw/pci_internals.h')
-rw-r--r--hw/pci_internals.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/hw/pci_internals.h b/hw/pci_internals.h
index 96690b72d3..399c6d475c 100644
--- a/hw/pci_internals.h
+++ b/hw/pci_internals.h
@@ -12,7 +12,8 @@
* Use accessor function in pci.h, pci_bridge.h
*/
-extern struct BusInfo pci_bus_info;
+#define TYPE_PCI_BUS "PCI"
+#define PCI_BUS(obj) OBJECT_CHECK(PCIBus, (obj), TYPE_PCI_BUS)
struct PCIBus {
BusState qbus;