docs: core-api: Fix the ISA DMA example
PATCH 1/1 docs: core-api: Fix the ISA DMA example
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 <[email protected]>
--- Documentation/core-api/dma-isa-lpc.rst | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-)
Documentation/core-api/dma-isa-lpc.rst +6 -5
@@ -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);
Signature · 1 line
2.53.0
Quoted 10 lines · Karl Mehltretter
The example never matched the ISA DMA API: the functions are named
enable_dma(),disable_dma()andget_dma_residue(),clear_dma_ff()takes the channel number, andclaim_dma_lock()returns an unsigned long.Fixes ddb99f3d35b1 ("[PATCH] ISA DMA API documentation")Assisted-by LLMSigned-off-by Karl Mehltretter <[email protected]>--- Documentation/core-api/dma-isa-lpc.rst | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-)
Applied, thanks (not that I think people are paying much attention to ISA DMA these days).
jon