aboutsummaryrefslogtreecommitdiff
path: root/hw/ide/sii3112.c
diff options
context:
space:
mode:
authorBernhard Beschow <shentey@gmail.com>2023-05-31 23:10:40 +0200
committerPhilippe Mathieu-Daudé <philmd@linaro.org>2023-07-11 00:11:25 +0200
commitbf0576edd71cf4f70352cc8de1cc914b419b36ff (patch)
tree15f1072822a967730f745b8a5437a7d18649688e /hw/ide/sii3112.c
parent4e5a20b6da9b1f6d2e9621ed7eb8b239560104ae (diff)
downloadqemu-bf0576edd71cf4f70352cc8de1cc914b419b36ff.zip
qemu-bf0576edd71cf4f70352cc8de1cc914b419b36ff.tar.gz
qemu-bf0576edd71cf4f70352cc8de1cc914b419b36ff.tar.bz2
hw/ide: Extract IDEBus assignment into bmdma_init()
Every invocation of bmdma_init() is followed by `d->bmdma[i].bus = &d->bus[i]`. Resolve this redundancy by extracting it into bmdma_init(). Signed-off-by: Bernhard Beschow <shentey@gmail.com> Reviewed-by: BALATON Zoltan <balaton@eik.bme.hu> Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org> Reviewed-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk> Message-Id: <20230531211043.41724-5-shentey@gmail.com> Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Diffstat (limited to 'hw/ide/sii3112.c')
-rw-r--r--hw/ide/sii3112.c1
1 files changed, 0 insertions, 1 deletions
diff --git a/hw/ide/sii3112.c b/hw/ide/sii3112.c
index f9becdf..5dd3d03 100644
--- a/hw/ide/sii3112.c
+++ b/hw/ide/sii3112.c
@@ -287,7 +287,6 @@ static void sii3112_pci_realize(PCIDevice *dev, Error **errp)
ide_bus_init_output_irq(&s->bus[i], qdev_get_gpio_in(ds, i));
bmdma_init(&s->bus[i], &s->bmdma[i], s);
- s->bmdma[i].bus = &s->bus[i];
ide_bus_register_restart_cb(&s->bus[i]);
}
}