* [Qemu-devel] [PATCH] grackle_pci: Clean up qdev names
@ 2012-01-18 10:11 Andreas Färber
2012-01-18 16:32 ` Alexander Graf
0 siblings, 1 reply; 2+ messages in thread
From: Andreas Färber @ 2012-01-18 10:11 UTC (permalink / raw)
To: qemu-devel; +Cc: Anthony Liguori, qemu-ppc, Andreas Färber, Alexander Graf
Rename SysBus device from 'grackle' to 'grackle-pcihost' to resolve a
name conflict.
Also mark both devices as no_user.
Signed-off-by: Andreas Färber <afaerber@suse.de>
Cc: Alexander Graf <agraf@suse.de>
Cc: Anthony Liguori <aliguori@us.ibm.com>
---
hw/grackle_pci.c | 17 ++++++++++++-----
1 files changed, 12 insertions(+), 5 deletions(-)
diff --git a/hw/grackle_pci.c b/hw/grackle_pci.c
index 1e529fb..be10a6d 100644
--- a/hw/grackle_pci.c
+++ b/hw/grackle_pci.c
@@ -71,7 +71,7 @@ PCIBus *pci_grackle_init(uint32_t base, qemu_irq *pic,
SysBusDevice *s;
GrackleState *d;
- dev = qdev_create(NULL, "grackle");
+ dev = qdev_create(NULL, "grackle-pcihost");
qdev_init_nofail(dev);
s = sysbus_from_qdev(dev);
d = FROM_SYSBUS(GrackleState, s);
@@ -121,9 +121,10 @@ static int grackle_pci_host_init(PCIDevice *d)
return 0;
}
-static PCIDeviceInfo grackle_pci_host_info = {
+static PCIDeviceInfo grackle_pci_info = {
.qdev.name = "grackle",
.qdev.size = sizeof(PCIDevice),
+ .qdev.no_user = 1,
.init = grackle_pci_host_init,
.vendor_id = PCI_VENDOR_ID_MOTOROLA,
.device_id = PCI_DEVICE_ID_MOTOROLA_MPC106,
@@ -131,11 +132,17 @@ static PCIDeviceInfo grackle_pci_host_info = {
.class_id = PCI_CLASS_BRIDGE_HOST,
};
+static SysBusDeviceInfo grackle_pci_host_info = {
+ .qdev.name = "grackle-pcihost",
+ .qdev.size = sizeof(GrackleState),
+ .qdev.no_user = 1,
+ .init = pci_grackle_init_device,
+};
+
static void grackle_register_devices(void)
{
- sysbus_register_dev("grackle", sizeof(GrackleState),
- pci_grackle_init_device);
- pci_qdev_register(&grackle_pci_host_info);
+ sysbus_register_withprop(&grackle_pci_host_info);
+ pci_qdev_register(&grackle_pci_info);
}
device_init(grackle_register_devices)
--
1.7.7
^ permalink raw reply related [flat|nested] 2+ messages in thread
end of thread, other threads:[~2012-01-18 16:32 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-01-18 10:11 [Qemu-devel] [PATCH] grackle_pci: Clean up qdev names Andreas Färber
2012-01-18 16:32 ` Alexander Graf
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).