aboutsummaryrefslogtreecommitdiff
path: root/hw/block
diff options
context:
space:
mode:
authorPhilippe Mathieu-Daudé <philmd@linaro.org>2023-02-15 15:36:42 +0100
committerPhilippe Mathieu-Daudé <philmd@linaro.org>2023-02-27 22:29:02 +0100
commit8e7db8ab5179474b6277d549d62c1184681dc915 (patch)
tree75afe0c8db34b722add1501fe5fd6b8a49b1a050 /hw/block
parentd2fbec575f652dc35239c5b026f7ebabc548beb1 (diff)
downloadqemu-8e7db8ab5179474b6277d549d62c1184681dc915.zip
qemu-8e7db8ab5179474b6277d549d62c1184681dc915.tar.gz
qemu-8e7db8ab5179474b6277d549d62c1184681dc915.tar.bz2
hw: Replace isa_get_irq() by isa_bus_get_irq() when ISABus is available
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org> Reviewed-by: Thomas Huth <thuth@redhat.com> Message-Id: <20230215161641.32663-4-philmd@linaro.org>
Diffstat (limited to 'hw/block')
-rw-r--r--hw/block/fdc-isa.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/hw/block/fdc-isa.c b/hw/block/fdc-isa.c
index a5f07b6..7ec075e 100644
--- a/hw/block/fdc-isa.c
+++ b/hw/block/fdc-isa.c
@@ -86,6 +86,7 @@ static const MemoryRegionPortio fdc_portio_list[] = {
static void isabus_fdc_realize(DeviceState *dev, Error **errp)
{
ISADevice *isadev = ISA_DEVICE(dev);
+ ISABus *bus = isa_bus_from_device(isadev);
FDCtrlISABus *isa = ISA_FDC(dev);
FDCtrl *fdctrl = &isa->state;
Error *err = NULL;
@@ -94,11 +95,11 @@ static void isabus_fdc_realize(DeviceState *dev, Error **errp)
isa->iobase, fdc_portio_list, fdctrl,
"fdc");
- fdctrl->irq = isa_get_irq(isadev, isa->irq);
+ fdctrl->irq = isa_bus_get_irq(bus, isa->irq);
fdctrl->dma_chann = isa->dma;
if (fdctrl->dma_chann != -1) {
IsaDmaClass *k;
- fdctrl->dma = isa_bus_get_dma(isa_bus_from_device(isadev), isa->dma);
+ fdctrl->dma = isa_bus_get_dma(bus, isa->dma);
if (!fdctrl->dma) {
error_setg(errp, "ISA controller does not support DMA");
return;