[PATCH] docs: core-api: Fix the ISA DMA example

From: Karl Mehltretter

Date: Fri Sep 04 2026 - 22:23:42 EST


The example never matched the ISA DMA API: the functions are named
enable_dma(), disable_dma() and get_dma_residue(), clear_dma_ff() takes
the channel number, and claim_dma_lock() returns an unsigned long.

Fixes: ddb99f3d35b1 ("[PATCH] ISA DMA API documentation")
Assisted-by: LLM
Signed-off-by: Karl Mehltretter <kmehltretter@xxxxxxxxx>
---
Documentation/core-api/dma-isa-lpc.rst | 11 ++++++-----
1 file changed, 6 insertions(+), 5 deletions(-)

diff --git a/Documentation/core-api/dma-isa-lpc.rst b/Documentation/core-api/dma-isa-lpc.rst
index 17b193603f0a..296838ff295a 100644
--- a/Documentation/core-api/dma-isa-lpc.rst
+++ b/Documentation/core-api/dma-isa-lpc.rst
@@ -115,17 +115,18 @@ sure that all data has been transferred.

Example::

- int flags, residue;
+ unsigned long flags;
+ int residue;

flags = claim_dma_lock();

- clear_dma_ff();
+ clear_dma_ff(channel);

set_dma_mode(channel, DMA_MODE_WRITE);
set_dma_addr(channel, phys_addr);
set_dma_count(channel, num_bytes);

- dma_enable(channel);
+ enable_dma(channel);

release_dma_lock(flags);

@@ -133,9 +134,9 @@ Example::

flags = claim_dma_lock();

- dma_disable(channel);
+ disable_dma(channel);

- residue = dma_get_residue(channel);
+ residue = get_dma_residue(channel);
if (residue != 0)
printk(KERN_ERR "driver: Incomplete DMA transfer!"
" %d bytes left!\n", residue);
--
2.53.0