From 8558d942b665a9ff0847851615e107308f6386a5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andreas=20F=C3=A4rber?= Date: Mon, 20 Aug 2012 19:08:08 +0200 Subject: pci: Derive PCI host bridges from TYPE_PCI_HOST_BRIDGE MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Use PCIHostState and PCI_HOST_BRIDGE() where appropriate. Signed-off-by: Andreas Färber Signed-off-by: Anthony Liguori --- hw/dec_pci.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'hw/dec_pci.c') diff --git a/hw/dec_pci.c b/hw/dec_pci.c index 19aed1b..de16361 100644 --- a/hw/dec_pci.c +++ b/hw/dec_pci.c @@ -91,7 +91,7 @@ static int pci_dec_21154_device_init(SysBusDevice *dev) { PCIHostState *phb; - phb = FROM_SYSBUS(PCIHostState, dev); + phb = PCI_HOST_BRIDGE(dev); memory_region_init_io(&phb->conf_mem, &pci_host_conf_le_ops, dev, "pci-conf-idx", 0x1000); @@ -136,7 +136,7 @@ static void pci_dec_21154_device_class_init(ObjectClass *klass, void *data) static const TypeInfo pci_dec_21154_device_info = { .name = TYPE_DEC_21154, - .parent = TYPE_SYS_BUS_DEVICE, + .parent = TYPE_PCI_HOST_BRIDGE, .instance_size = sizeof(DECState), .class_init = pci_dec_21154_device_class_init, }; -- cgit v1.1