Revision 71077c1c hw/pci.c

b/hw/pci.c
923 923
    }
924 924
}
925 925

  
926
PCIDevice *pci_create_simple(PCIBus *bus, int devfn, const char *name)
926
PCIDevice *pci_create_noinit(PCIBus *bus, int devfn, const char *name)
927 927
{
928 928
    DeviceState *dev;
929 929

  
930 930
    dev = qdev_create(&bus->qbus, name);
931 931
    qdev_prop_set_uint32(dev, "addr", devfn);
932
    qdev_init(dev);
932
    return DO_UPCAST(PCIDevice, qdev, dev);
933
}
933 934

  
934
    return (PCIDevice *)dev;
935
PCIDevice *pci_create_simple(PCIBus *bus, int devfn, const char *name)
936
{
937
    PCIDevice *dev = pci_create_noinit(bus, devfn, name);
938
    qdev_init(&dev->qdev);
939
    return dev;
935 940
}
936 941

  
937 942
static int pci_find_space(PCIDevice *pdev, uint8_t size)

Also available in: Unified diff