qemu-trivial
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-trivial] [PATCH v2 5/7] hw/arm/palm.c: Store irq array in MachineS


From: Shannon Zhao
Subject: [Qemu-trivial] [PATCH v2 5/7] hw/arm/palm.c: Store irq array in MachineState to fix memory leak
Date: Sat, 30 May 2015 15:54:35 +0800

From: Shannon Zhao <address@hidden>

Signed-off-by: Shannon Zhao <address@hidden>
Signed-off-by: Shannon Zhao <address@hidden>
---
 hw/arm/palm.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/hw/arm/palm.c b/hw/arm/palm.c
index 7f1cfb8..6fe28e5 100644
--- a/hw/arm/palm.c
+++ b/hw/arm/palm.c
@@ -156,7 +156,7 @@ static void palmte_onoff_gpios(void *opaque, int line, int 
level)
     }
 }
 
-static void palmte_gpio_setup(struct omap_mpu_state_s *cpu)
+static qemu_irq *palmte_gpio_setup(struct omap_mpu_state_s *cpu)
 {
     qemu_irq *misc_gpio;
 
@@ -183,6 +183,8 @@ static void palmte_gpio_setup(struct omap_mpu_state_s *cpu)
     qemu_irq_raise(omap_mpuio_in_get(cpu->mpuio)[6]);
     qemu_irq_raise(omap_mpuio_in_get(cpu->mpuio)[7]);
     qemu_irq_raise(omap_mpuio_in_get(cpu->mpuio)[11]);
+
+    return misc_gpio;
 }
 
 static struct arm_boot_info palmte_binfo = {
@@ -236,7 +238,7 @@ static void palmte_init(MachineState *machine)
 
     qemu_add_kbd_event_handler(palmte_button_event, mpu);
 
-    palmte_gpio_setup(mpu);
+    machine->irqs = palmte_gpio_setup(mpu);
 
     /* Setup initial (reset) machine state */
     if (nb_option_roms) {
-- 
2.0.4





reply via email to

[Prev in Thread] Current Thread [Next in Thread]