[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH v3 7/8] hw/arm/spitz.c: Store irq array in MachineSt
From: |
Shannon Zhao |
Subject: |
[Qemu-devel] [PATCH v3 7/8] hw/arm/spitz.c: Store irq array in MachineState to fix memory leak |
Date: |
Wed, 17 Jun 2015 11:00:01 +0800 |
From: Shannon Zhao <address@hidden>
Signed-off-by: Shannon Zhao <address@hidden>
Signed-off-by: Shannon Zhao <address@hidden>
---
hw/arm/spitz.c | 8 +++++---
1 file changed, 5 insertions(+), 3 deletions(-)
diff --git a/hw/arm/spitz.c b/hw/arm/spitz.c
index 5bf032a..454919d 100644
--- a/hw/arm/spitz.c
+++ b/hw/arm/spitz.c
@@ -812,8 +812,8 @@ static void spitz_out_switch(void *opaque, int line, int
level)
#define SPITZ_SCP2_BACKLIGHT_ON 8
#define SPITZ_SCP2_MIC_BIAS 9
-static void spitz_scoop_gpio_setup(PXA2xxState *cpu,
- DeviceState *scp0, DeviceState *scp1)
+static qemu_irq *spitz_scoop_gpio_setup(PXA2xxState *cpu,
+ DeviceState *scp0, DeviceState *scp1)
{
qemu_irq *outsignals = qemu_allocate_irqs(spitz_out_switch, cpu, 8);
@@ -828,6 +828,8 @@ static void spitz_scoop_gpio_setup(PXA2xxState *cpu,
}
qdev_connect_gpio_out(scp0, SPITZ_SCP_ADC_TEMP_ON, outsignals[6]);
+
+ return outsignals;
}
#define SPITZ_GPIO_HSYNC 22
@@ -928,7 +930,7 @@ static void spitz_common_init(MachineState *machine,
scp1 = sysbus_create_simple("scoop", 0x08800040, NULL);
}
- spitz_scoop_gpio_setup(mpu, scp0, scp1);
+ machine->irqs = spitz_scoop_gpio_setup(mpu, scp0, scp1);
spitz_gpio_setup(mpu, (model == akita) ? 1 : 2);
--
2.0.4
- [Qemu-devel] [PATCH v3 0/8] Add a member in MachineState to store irq array, Shannon Zhao, 2015/06/16
- [Qemu-devel] [PATCH v3 4/8] hw/m68k/an5206.c: Store irq array in MachineState to fix memory leak, Shannon Zhao, 2015/06/16
- [Qemu-devel] [PATCH v3 3/8] hw/sparc/leon3.c: Store irq array in MachineState to fix memory leak, Shannon Zhao, 2015/06/16
- [Qemu-devel] [PATCH v3 5/8] hw/sh4/r2d.c: Store irq array in MachineState to fix memory leak, Shannon Zhao, 2015/06/16
- [Qemu-devel] [PATCH v3 6/8] hw/arm/palm.c: Store irq array in MachineState to fix memory leak, Shannon Zhao, 2015/06/16
- [Qemu-devel] [PATCH v3 8/8] hw/arm/tosa.c: Store irq array in MachineState to fix memory leak, Shannon Zhao, 2015/06/16
- [Qemu-devel] [PATCH v3 7/8] hw/arm/spitz.c: Store irq array in MachineState to fix memory leak,
Shannon Zhao <=
- [Qemu-devel] [PATCH v3 1/8] include/hw/boards.h: Add a member in MachineState to store irq array, Shannon Zhao, 2015/06/16
- [Qemu-devel] [PATCH v3 2/8] hw/ppc/ppc440_bamboo.c: Store irq array in MachineState to fix memory leak, Shannon Zhao, 2015/06/16
- Re: [Qemu-devel] [PATCH v3 0/8] Add a member in MachineState to store irq array, Michael Tokarev, 2015/06/17