mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-08 18:23:57 -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
|
@ -58,7 +58,7 @@ static void i82378_request_pic_irq(void *opaque, int irq, int level)
|
|||
qemu_set_irq(s->i8259[irq], level);
|
||||
}
|
||||
|
||||
static int i82378_initfn(PCIDevice *pci)
|
||||
static void i82378_realize(PCIDevice *pci, Error **errp)
|
||||
{
|
||||
DeviceState *dev = DEVICE(pci);
|
||||
I82378State *s = I82378(dev);
|
||||
|
@ -107,8 +107,6 @@ static int i82378_initfn(PCIDevice *pci)
|
|||
|
||||
/* timer */
|
||||
isa_create_simple(isabus, "mc146818rtc");
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static void i82378_init(Object *obj)
|
||||
|
@ -125,7 +123,7 @@ static void i82378_class_init(ObjectClass *klass, void *data)
|
|||
PCIDeviceClass *k = PCI_DEVICE_CLASS(klass);
|
||||
DeviceClass *dc = DEVICE_CLASS(klass);
|
||||
|
||||
k->init = i82378_initfn;
|
||||
k->realize = i82378_realize;
|
||||
k->vendor_id = PCI_VENDOR_ID_INTEL;
|
||||
k->device_id = PCI_DEVICE_ID_INTEL_82378;
|
||||
k->revision = 0x03;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue