@@ -815,7 +815,7 @@ static void spitz_out_switch(void *opaque, int line, int level)
static void spitz_scoop_gpio_setup(PXA2xxState *cpu,
DeviceState *scp0, DeviceState *scp1)
{
- qemu_irq *outsignals = qemu_allocate_irqs(spitz_out_switch, cpu, 8);
+ qemu_irq *outsignals = qemu_allocate_irqs(spitz_out_switch, cpu, 7);
qdev_connect_gpio_out(scp0, SPITZ_SCP_CHRG_ON, outsignals[0]);
qdev_connect_gpio_out(scp0, SPITZ_SCP_JK_B, outsignals[1]);
@@ -825,9 +825,13 @@ static void spitz_scoop_gpio_setup(PXA2xxState *cpu,
if (scp1) {
qdev_connect_gpio_out(scp1, SPITZ_SCP2_BACKLIGHT_CONT, outsignals[4]);
qdev_connect_gpio_out(scp1, SPITZ_SCP2_BACKLIGHT_ON, outsignals[5]);
+ } else {
+ qemu_free_irq(outsignals[4]);
+ qemu_free_irq(outsignals[5]);
}
qdev_connect_gpio_out(scp0, SPITZ_SCP_ADC_TEMP_ON, outsignals[6]);
+ g_free(outsignals);
}
#define SPITZ_GPIO_HSYNC 22