mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-07 09:43:56 -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
|
@ -326,7 +326,7 @@ static void cmd646_pci_config_write(PCIDevice *d, uint32_t addr, uint32_t val,
|
|||
}
|
||||
|
||||
/* CMD646 PCI IDE controller */
|
||||
static int pci_cmd646_ide_initfn(PCIDevice *dev)
|
||||
static void pci_cmd646_ide_realize(PCIDevice *dev, Error **errp)
|
||||
{
|
||||
PCIIDEState *d = PCI_IDE(dev);
|
||||
uint8_t *pci_conf = dev->config;
|
||||
|
@ -374,7 +374,6 @@ static int pci_cmd646_ide_initfn(PCIDevice *dev)
|
|||
|
||||
vmstate_register(DEVICE(dev), 0, &vmstate_ide_pci, d);
|
||||
qemu_register_reset(cmd646_reset, d);
|
||||
return 0;
|
||||
}
|
||||
|
||||
static void pci_cmd646_ide_exitfn(PCIDevice *dev)
|
||||
|
@ -410,7 +409,7 @@ static void cmd646_ide_class_init(ObjectClass *klass, void *data)
|
|||
DeviceClass *dc = DEVICE_CLASS(klass);
|
||||
PCIDeviceClass *k = PCI_DEVICE_CLASS(klass);
|
||||
|
||||
k->init = pci_cmd646_ide_initfn;
|
||||
k->realize = pci_cmd646_ide_realize;
|
||||
k->exit = pci_cmd646_ide_exitfn;
|
||||
k->vendor_id = PCI_VENDOR_ID_CMD;
|
||||
k->device_id = PCI_DEVICE_ID_CMD_646;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue