aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPhilippe Mathieu-Daudé <philmd@linaro.org>2023-02-15 15:38:19 +0100
committerPhilippe Mathieu-Daudé <philmd@linaro.org>2023-02-27 22:29:02 +0100
commitdc8d6cf2033c813ade9863a926f2d71a22edd249 (patch)
tree198ca8472ae6b0b6474358beecf6e90b058e9fca
parente5bf2779a1feafa85adae9a8ba22cbb54af00c85 (diff)
hw/isa: Rename isa_get_dma() -> isa_bus_get_dma()
isa_get_dma() returns a DMA channel handler from an ISABus. To emphasize this, rename it as isa_bus_get_dma(). Mechanical change using: $ sed -i -e 's/isa_get_dma/isa_bus_get_dma/g' \ $(git grep -l isa_get_dma) Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org> Reviewed-by: Thomas Huth <thuth@redhat.com> Message-Id: <20230215161641.32663-2-philmd@linaro.org>
-rw-r--r--hw/audio/cs4231a.c2
-rw-r--r--hw/audio/gus.c2
-rw-r--r--hw/audio/sb16.c4
-rw-r--r--hw/block/fdc-isa.c2
-rw-r--r--hw/dma/i82374.c2
-rw-r--r--hw/isa/isa-bus.c2
-rw-r--r--include/hw/isa/isa.h2
7 files changed, 8 insertions, 8 deletions
diff --git a/hw/audio/cs4231a.c b/hw/audio/cs4231a.c
index 7f17a72a9c..ec066fcd89 100644
--- a/hw/audio/cs4231a.c
+++ b/hw/audio/cs4231a.c
@@ -671,7 +671,7 @@ static void cs4231a_realizefn (DeviceState *dev, Error **errp)
CSState *s = CS4231A (dev);
IsaDmaClass *k;
- s->isa_dma = isa_get_dma(isa_bus_from_device(d), s->dma);
+ s->isa_dma = isa_bus_get_dma(isa_bus_from_device(d), s->dma);
if (!s->isa_dma) {
error_setg(errp, "ISA controller does not support DMA");
return;
diff --git a/hw/audio/gus.c b/hw/audio/gus.c
index 42f010b671..2a08a0f7d7 100644
--- a/hw/audio/gus.c
+++ b/hw/audio/gus.c
@@ -240,7 +240,7 @@ static void gus_realizefn (DeviceState *dev, Error **errp)
IsaDmaClass *k;
struct audsettings as;
- s->isa_dma = isa_get_dma(isa_bus_from_device(d), s->emu.gusdma);
+ s->isa_dma = isa_bus_get_dma(isa_bus_from_device(d), s->emu.gusdma);
if (!s->isa_dma) {
error_setg(errp, "ISA controller does not support DMA");
return;
diff --git a/hw/audio/sb16.c b/hw/audio/sb16.c
index 2215386ddb..ae745c7283 100644
--- a/hw/audio/sb16.c
+++ b/hw/audio/sb16.c
@@ -1401,8 +1401,8 @@ static void sb16_realizefn (DeviceState *dev, Error **errp)
SB16State *s = SB16 (dev);
IsaDmaClass *k;
- s->isa_hdma = isa_get_dma(isa_bus_from_device(isadev), s->hdma);
- s->isa_dma = isa_get_dma(isa_bus_from_device(isadev), s->dma);
+ s->isa_hdma = isa_bus_get_dma(isa_bus_from_device(isadev), s->hdma);
+ s->isa_dma = isa_bus_get_dma(isa_bus_from_device(isadev), s->dma);
if (!s->isa_dma || !s->isa_hdma) {
error_setg(errp, "ISA controller does not support DMA");
return;
diff --git a/hw/block/fdc-isa.c b/hw/block/fdc-isa.c
index fee1ca68a8..a5f07b668d 100644
--- a/hw/block/fdc-isa.c
+++ b/hw/block/fdc-isa.c
@@ -98,7 +98,7 @@ static void isabus_fdc_realize(DeviceState *dev, Error **errp)
fdctrl->dma_chann = isa->dma;
if (fdctrl->dma_chann != -1) {
IsaDmaClass *k;
- fdctrl->dma = isa_get_dma(isa_bus_from_device(isadev), isa->dma);
+ fdctrl->dma = isa_bus_get_dma(isa_bus_from_device(isadev), isa->dma);
if (!fdctrl->dma) {
error_setg(errp, "ISA controller does not support DMA");
return;
diff --git a/hw/dma/i82374.c b/hw/dma/i82374.c
index 34c3aaf7d3..63734c22c9 100644
--- a/hw/dma/i82374.c
+++ b/hw/dma/i82374.c
@@ -125,7 +125,7 @@ static void i82374_realize(DeviceState *dev, Error **errp)
I82374State *s = I82374(dev);
ISABus *isa_bus = isa_bus_from_device(ISA_DEVICE(dev));
- if (isa_get_dma(isa_bus, 0)) {
+ if (isa_bus_get_dma(isa_bus, 0)) {
error_setg(errp, "DMA already initialized on ISA bus");
return;
}
diff --git a/hw/isa/isa-bus.c b/hw/isa/isa-bus.c
index b3d2e5ec52..80d8fb4c5b 100644
--- a/hw/isa/isa-bus.c
+++ b/hw/isa/isa-bus.c
@@ -99,7 +99,7 @@ void isa_bus_dma(ISABus *bus, IsaDma *dma8, IsaDma *dma16)
bus->dma[1] = dma16;
}
-IsaDma *isa_get_dma(ISABus *bus, int nchan)
+IsaDma *isa_bus_get_dma(ISABus *bus, int nchan)
{
assert(bus);
return bus->dma[nchan > 3 ? 1 : 0];
diff --git a/include/hw/isa/isa.h b/include/hw/isa/isa.h
index eb920aa710..3a60f6afa6 100644
--- a/include/hw/isa/isa.h
+++ b/include/hw/isa/isa.h
@@ -71,7 +71,7 @@ ISABus *isa_bus_new(DeviceState *dev, MemoryRegion *address_space,
MemoryRegion *address_space_io, Error **errp);
void isa_bus_register_input_irqs(ISABus *bus, qemu_irq *irqs_in);
void isa_bus_dma(ISABus *bus, IsaDma *dma8, IsaDma *dma16);
-IsaDma *isa_get_dma(ISABus *bus, int nchan);
+IsaDma *isa_bus_get_dma(ISABus *bus, int nchan);
ISADevice *isa_new(const char *name);
ISADevice *isa_try_new(const char *name);
bool isa_realize_and_unref(ISADevice *dev, ISABus *bus, Error **errp);