diff options
author | Cao jin <caoj.fnst@cn.fujitsu.com> | 2016-01-15 10:23:31 +0800 |
---|---|---|
committer | Michael S. Tsirkin <mst@redhat.com> | 2016-02-16 12:05:18 +0200 |
commit | 33c28f3bde02e6dd69da58f9a8b7e4a50c616849 (patch) | |
tree | f37d3e21a92c69dbd389a2b7efdafbae60b37df4 /hw/pci-bridge/dec.c | |
parent | 4e082566a9cd17e5f00d0df85a67dc7a086d30b0 (diff) | |
download | qemu-33c28f3bde02e6dd69da58f9a8b7e4a50c616849.zip qemu-33c28f3bde02e6dd69da58f9a8b7e4a50c616849.tar.gz qemu-33c28f3bde02e6dd69da58f9a8b7e4a50c616849.tar.bz2 |
dec: convert to realize()
Also because pci_bridge_initfn() can`t fail.
Signed-off-by: Cao jin <caoj.fnst@cn.fujitsu.com>
Reviewed-by: Markus Armbruster <armbru@redhat.com>
Reviewed-by: Marcel Apfelbaum <marcel@redhat.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Diffstat (limited to 'hw/pci-bridge/dec.c')
-rw-r--r-- | hw/pci-bridge/dec.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/hw/pci-bridge/dec.c b/hw/pci-bridge/dec.c index 40ff0d0..840c961 100644 --- a/hw/pci-bridge/dec.c +++ b/hw/pci-bridge/dec.c @@ -52,9 +52,9 @@ static int dec_map_irq(PCIDevice *pci_dev, int irq_num) return irq_num; } -static int dec_pci_bridge_initfn(PCIDevice *pci_dev) +static void dec_pci_bridge_realize(PCIDevice *pci_dev, Error **errp) { - return pci_bridge_initfn(pci_dev, TYPE_PCI_BUS); + pci_bridge_initfn(pci_dev, TYPE_PCI_BUS); } static void dec_21154_pci_bridge_class_init(ObjectClass *klass, void *data) @@ -62,7 +62,7 @@ static void dec_21154_pci_bridge_class_init(ObjectClass *klass, void *data) DeviceClass *dc = DEVICE_CLASS(klass); PCIDeviceClass *k = PCI_DEVICE_CLASS(klass); - k->init = dec_pci_bridge_initfn; + k->realize = dec_pci_bridge_realize; k->exit = pci_bridge_exitfn; k->vendor_id = PCI_VENDOR_ID_DEC; k->device_id = PCI_DEVICE_ID_DEC_21154; |