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/net/can/can_pcm3680_pci.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/hw/net/can/can_pcm3680_pci.c b/hw/net/can/can_pcm3680_pci.c index 8ef3e4659c..50f01d02bd 100644 --- a/hw/net/can/can_pcm3680_pci.c +++ b/hw/net/can/can_pcm3680_pci.c @@ -163,7 +163,7 @@ static void pcm3680i_pci_realize(PCIDevice *pci_dev, Error **errp) pci_conf = pci_dev->config; pci_conf[PCI_INTERRUPT_PIN] = 0x01; /* interrupt pin A */ - d->irq = pci_allocate_irq(&d->dev); + d->irq = qdev_get_gpio_in_named(DEVICE(pci_dev), "pci-input-irq", 0); for (i = 0; i < PCM3680i_PCI_SJA_COUNT; i++) { can_sja_init(&d->sja_state[i], d->irq); @@ -196,8 +196,6 @@ static void pcm3680i_pci_exit(PCIDevice *pci_dev) for (i = 0; i < PCM3680i_PCI_SJA_COUNT; i++) { can_sja_disconnect(&d->sja_state[i]); } - - qemu_free_irq(d->irq); } static const VMStateDescription vmstate_pcm3680i_pci = { -- 2.30.2