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-ayland@ilande.co.uk>
---
hw/usb/hcd-ehci-pci.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/hw/usb/hcd-ehci-pci.c b/hw/usb/hcd-ehci-pci.c
index 4c37c8e227..eed98799b7 100644
--- a/hw/usb/hcd-ehci-pci.c
+++ b/hw/usb/hcd-ehci-pci.c
@@ -65,7 +65,7 @@ static void usb_ehci_pci_realize(PCIDevice *dev, Error **errp)
pci_conf[0x6e] = 0x00;
pci_conf[0x6f] = 0xc0; /* USBLEFCTLSTS */
- s->irq = pci_allocate_irq(dev);
+ s->irq = qdev_get_gpio_in_named(DEVICE(dev), "pci-input-irq", 0);
s->as = pci_get_address_space(dev);
usb_ehci_realize(s, DEVICE(dev), NULL);
@@ -107,7 +107,6 @@ static void usb_ehci_pci_exit(PCIDevice *dev)
usb_ehci_unrealize(s, DEVICE(dev));
- g_free(s->irq);
s->irq = NULL;
}
--
2.30.2