mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-06 01:03:55 -06:00
pci: Trivial device model conversions to realize
Convert the device models where initialization obviously can't fail. Signed-off-by: Markus Armbruster <armbru@redhat.com> Reviewed-by: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com> Reviewed-by: Gonglei <arei.gonglei@huawei.com>
This commit is contained in:
parent
7ee6c1e182
commit
9af21dbee1
34 changed files with 87 additions and 152 deletions
|
@ -1298,7 +1298,7 @@ static const MemoryRegionOps vmsvga_io_ops = {
|
|||
},
|
||||
};
|
||||
|
||||
static int pci_vmsvga_initfn(PCIDevice *dev)
|
||||
static void pci_vmsvga_realize(PCIDevice *dev, Error **errp)
|
||||
{
|
||||
struct pci_vmsvga_state_s *s = VMWARE_SVGA(dev);
|
||||
|
||||
|
@ -1323,8 +1323,6 @@ static int pci_vmsvga_initfn(PCIDevice *dev)
|
|||
/* compatibility with pc-0.13 and older */
|
||||
vga_init_vbe(&s->chip.vga, OBJECT(dev), pci_address_space(dev));
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static Property vga_vmware_properties[] = {
|
||||
|
@ -1338,7 +1336,7 @@ static void vmsvga_class_init(ObjectClass *klass, void *data)
|
|||
DeviceClass *dc = DEVICE_CLASS(klass);
|
||||
PCIDeviceClass *k = PCI_DEVICE_CLASS(klass);
|
||||
|
||||
k->init = pci_vmsvga_initfn;
|
||||
k->realize = pci_vmsvga_realize;
|
||||
k->romfile = "vgabios-vmware.bin";
|
||||
k->vendor_id = PCI_VENDOR_ID_VMWARE;
|
||||
k->device_id = SVGA_PCI_DEVICE_ID;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue