From f173d57a4cd3bb2a8362fe376cd9fd776b2f57d5 Mon Sep 17 00:00:00 2001 From: Peter Crosthwaite Date: Wed, 18 Jun 2014 00:56:31 -0700 Subject: irq: Allocate IRQs individually MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Allocate each IRQ individually on array allocations. This prepares for QOMification of IRQs, where pointers to individual IRQs may be taken and handed around for usage as QOM Links. The g_renew() scheme used here is too fragile and would break all existing links should an IRQ list be extended. We now have to pass the IRQ count to qemu_free_irqs(). We have so few call sites however, so this change is reasonably trivial. Cc: agarcia@igalia.com Cc: mst@redhat.com Reviewed-by: Peter Maydell Acked-by: Alberto Garcia Signed-off-by: Peter Crosthwaite Signed-off-by: Andreas Färber --- include/hw/irq.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'include') diff --git a/include/hw/irq.h b/include/hw/irq.h index d08bc02..9f34c96 100644 --- a/include/hw/irq.h +++ b/include/hw/irq.h @@ -42,7 +42,7 @@ qemu_irq qemu_allocate_irq(qemu_irq_handler handler, void *opaque, int n); qemu_irq *qemu_extend_irqs(qemu_irq *old, int n_old, qemu_irq_handler handler, void *opaque, int n); -void qemu_free_irqs(qemu_irq *s); +void qemu_free_irqs(qemu_irq *s, int n); void qemu_free_irq(qemu_irq irq); /* Returns a new IRQ with opposite polarity. */ -- cgit v1.1