@@ -85,10 +85,10 @@ qemu_irq isa_bus_get_irq(ISABus *bus, unsigned irqnum)
* This function is only for special cases such as the 'ferr', and
* temporary use for normal devices until they are converted to qdev.
*/
-qemu_irq isa_get_irq(ISADevice *dev, unsigned isairq)
+qemu_irq isa_get_irq(ISADevice *dev, unsigned irqnum)
{
- assert(!dev || ISA_BUS(qdev_get_parent_bus(DEVICE(dev))) == isabus);
- return isa_bus_get_irq(isabus, isairq);
+ assert(dev);
+ return isa_bus_get_irq(ISA_BUS(qdev_get_parent_bus(DEVICE(dev))), irqnum);
}
void isa_connect_gpio_out(ISADevice *isadev, int gpioirq, unsigned isairq)
@@ -74,7 +74,6 @@ struct ISADevice {
ISABus *isa_bus_new(DeviceState *dev, MemoryRegion *address_space,
MemoryRegion *address_space_io, Error **errp);
void isa_bus_irqs(ISABus *bus, qemu_irq *irqs);
-qemu_irq isa_get_irq(ISADevice *dev, unsigned isairq);
void isa_connect_gpio_out(ISADevice *isadev, int gpioirq, unsigned isairq);
void isa_bus_dma(ISABus *bus, IsaDma *dma8, IsaDma *dma16);
IsaDma *isa_bus_get_dma(ISABus *bus, int nchan);
@@ -95,6 +94,9 @@ ISADevice *isa_create_simple(ISABus *bus, const char *name);
ISADevice *isa_vga_init(ISABus *bus);
+/* isa_get_irq() is deprecated, please use isa_bus_get_irq() instead. */
+qemu_irq isa_get_irq(ISADevice *dev, unsigned irqnum);
+
/**
* isa_register_ioport: Install an I/O port region on the ISA bus.
*
Last commit removed the last use of isa_get_irq(NULL). Add an assertion to ensure we won't use that hack again. Deprecate in favor of the BUS API: isa_bus_get_irq(). Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org> --- hw/isa/isa-bus.c | 6 +++--- include/hw/isa/isa.h | 4 +++- 2 files changed, 6 insertions(+), 4 deletions(-)