From: Karl Mehltretter <kmehltretter@gmail.com>
To: Jonathan Corbet <corbet@lwn.net>
Cc: Karl Mehltretter <kmehltretter@gmail.com>,
Shuah Khan <skhan@linuxfoundation.org>,
Randy Dunlap <rdunlap@infradead.org>,
Andrew Morton <akpm@linux-foundation.org>,
Pierre Ossman <drzeus@drzeus.cx>,
linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: [PATCH] docs: core-api: Fix the ISA DMA example
Date: Sat, 5 Sep 2026 04:23:10 +0200 [thread overview]
Message-ID: <20260905022310.82529-1-kmehltretter@gmail.com> (raw)
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@gmail.com>
---
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
next reply other threads:[~2026-09-05 2:23 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-09-05 2:23 Karl Mehltretter [this message]
2026-09-07 16:36 ` [PATCH] docs: core-api: Fix the ISA DMA example Jonathan Corbet
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20260905022310.82529-1-kmehltretter@gmail.com \
--to=kmehltretter@gmail.com \
--cc=akpm@linux-foundation.org \
--cc=corbet@lwn.net \
--cc=drzeus@drzeus.cx \
--cc=linux-doc@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=rdunlap@infradead.org \
--cc=skhan@linuxfoundation.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.