From 2e15e23b8a3c5da5576b7ea8631c956381eea0d5 Mon Sep 17 00:00:00 2001 From: Gerd Hoffmann Date: Thu, 10 Sep 2009 11:43:27 +0200 Subject: qdev: simplify isa irq assignments isa-bus owns the isa irqs now, so it can hand them out directly. There is no need for the separate isa_connect_irqs step, drop it. Also hard-code isa interrupts which can't be configured anyway. Signed-off-by: Gerd Hoffmann --- hw/fdc.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'hw/fdc.c') diff --git a/hw/fdc.c b/hw/fdc.c index d761e62..47b1c9d 100644 --- a/hw/fdc.c +++ b/hw/fdc.c @@ -1875,10 +1875,9 @@ fdctrl_t *fdctrl_init_isa(BlockDriverState **fds) { fdctrl_t *fdctrl; ISADevice *dev; - int isairq = 6; int dma_chann = 2; - dev = isa_create_simple("isa-fdc", isairq, -1); + dev = isa_create_simple("isa-fdc"); fdctrl = &(DO_UPCAST(fdctrl_isabus_t, busdev, dev)->state); fdctrl->dma_chann = dma_chann; @@ -1969,6 +1968,7 @@ static int isabus_fdc_init1(ISADevice *dev) fdctrl_isabus_t *isa = DO_UPCAST(fdctrl_isabus_t, busdev, dev); fdctrl_t *fdctrl = &isa->state; int iobase = 0x3f0; + int isairq = 6; register_ioport_read(iobase + 0x01, 5, 1, &fdctrl_read_port, fdctrl); @@ -1978,7 +1978,7 @@ static int isabus_fdc_init1(ISADevice *dev) &fdctrl_write_port, fdctrl); register_ioport_write(iobase + 0x07, 1, 1, &fdctrl_write_port, fdctrl); - isa_init_irq(&isa->busdev, &fdctrl->irq); + isa_init_irq(&isa->busdev, &fdctrl->irq, isairq); return fdctrl_init_common(fdctrl); } -- cgit v1.1