diff options
author | Shannon Zhao <shannon.zhao@linaro.org> | 2015-05-29 13:27:07 +0800 |
---|---|---|
committer | Michael Tokarev <mjt@tls.msk.ru> | 2015-06-03 14:21:24 +0300 |
commit | a9c8a0d8d4217754648decc5921e4b0fcd00ce7f (patch) | |
tree | 733c904d9aa5c7656c3c4ca98af983c2a1e06f03 /hw/lm32 | |
parent | d4ef00af2598fef06affbd42608e570237a7b276 (diff) | |
download | qemu-a9c8a0d8d4217754648decc5921e4b0fcd00ce7f.tar.gz qemu-a9c8a0d8d4217754648decc5921e4b0fcd00ce7f.tar.bz2 qemu-a9c8a0d8d4217754648decc5921e4b0fcd00ce7f.zip |
hw/lm32/milkymist.c: Fix misusing qemu_allocate_irqs for single irq
Signed-off-by: Shannon Zhao <zhaoshenglong@huawei.com>
Signed-off-by: Shannon Zhao <shannon.zhao@linaro.org>
Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
Diffstat (limited to 'hw/lm32')
-rw-r--r-- | hw/lm32/milkymist.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/hw/lm32/milkymist.c b/hw/lm32/milkymist.c index e0cec7dc41..e755f5b24f 100644 --- a/hw/lm32/milkymist.c +++ b/hw/lm32/milkymist.c @@ -86,7 +86,7 @@ milkymist_init(MachineState *machine) DriveInfo *dinfo; MemoryRegion *address_space_mem = get_system_memory(); MemoryRegion *phys_sdram = g_new(MemoryRegion, 1); - qemu_irq irq[32], *cpu_irq; + qemu_irq irq[32]; int i; char *bios_filename; ResetInfo *reset_info; @@ -130,8 +130,7 @@ milkymist_init(MachineState *machine) 2, 0x00, 0x89, 0x00, 0x1d, 1); /* create irq lines */ - cpu_irq = qemu_allocate_irqs(cpu_irq_handler, cpu, 1); - env->pic_state = lm32_pic_init(*cpu_irq); + env->pic_state = lm32_pic_init(qemu_allocate_irq(cpu_irq_handler, cpu, 0)); for (i = 0; i < 32; i++) { irq[i] = qdev_get_gpio_in(env->pic_state, i); } |