mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-07 01:33: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
|
@ -3567,7 +3567,7 @@ static void usb_xhci_init(XHCIState *xhci)
|
|||
}
|
||||
}
|
||||
|
||||
static int usb_xhci_initfn(struct PCIDevice *dev)
|
||||
static void usb_xhci_realize(struct PCIDevice *dev, Error **errp)
|
||||
{
|
||||
int i, ret;
|
||||
|
||||
|
@ -3646,8 +3646,6 @@ static int usb_xhci_initfn(struct PCIDevice *dev)
|
|||
&xhci->mem, 0, OFF_MSIX_PBA,
|
||||
0x90);
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static void usb_xhci_exit(PCIDevice *dev)
|
||||
|
@ -3887,7 +3885,7 @@ static void xhci_class_init(ObjectClass *klass, void *data)
|
|||
dc->props = xhci_properties;
|
||||
dc->reset = xhci_reset;
|
||||
set_bit(DEVICE_CATEGORY_USB, dc->categories);
|
||||
k->init = usb_xhci_initfn;
|
||||
k->realize = usb_xhci_realize;
|
||||
k->exit = usb_xhci_exit;
|
||||
k->vendor_id = PCI_VENDOR_ID_NEC;
|
||||
k->device_id = PCI_DEVICE_ID_NEC_UPD720200;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue