This replaces the call to pci_allocate_irq() and also allows the corresponding qemu_free_irq() to be removed.
Signed-off-by: Mark Cave-Ayland <mark.cave-ayl...@ilande.co.uk> --- hw/char/serial-pci.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/hw/char/serial-pci.c b/hw/char/serial-pci.c index 087da3059a..cd7e8b5b94 100644 --- a/hw/char/serial-pci.c +++ b/hw/char/serial-pci.c @@ -55,7 +55,7 @@ static void serial_pci_realize(PCIDevice *dev, Error **errp) pci->dev.config[PCI_CLASS_PROG] = pci->prog_if; pci->dev.config[PCI_INTERRUPT_PIN] = 0x01; - s->irq = pci_allocate_irq(&pci->dev); + s->irq = qdev_get_gpio_in_named(DEVICE(dev), "pci-input-irq", 0); memory_region_init_io(&s->io, OBJECT(pci), &serial_io_ops, s, "serial", 8); pci_register_bar(&pci->dev, 0, PCI_BASE_ADDRESS_SPACE_IO, &s->io); @@ -67,7 +67,6 @@ static void serial_pci_exit(PCIDevice *dev) SerialState *s = &pci->state; qdev_unrealize(DEVICE(s)); - qemu_free_irq(s->irq); } static const VMStateDescription vmstate_pci_serial = { -- 2.30.2