[PATCH v2] async_tx: use the channel-switch Kconfig symbol

Pengpeng Hou <[email protected]>
Newsgroups gmane.linux.kernel
Message-ID <[email protected]>
ASYNC_TX_ENABLE_CHANNEL_SWITCH is the Kconfig symbol selected by DMA
engine providers that need async_tx channel switching.

CONFIG_ASYNC_TX_CHANNEL_SWITCH is not generated by Kconfig, so the
shortcut in async_tx.h tests an impossible symbol. Use the generated
CONFIG_ASYNC_TX_ENABLE_CHANNEL_SWITCH name instead.

Fixes: b802c8410ca9 ("async_tx: deprecate broken support for channel switching")
Assisted-by: Codex:gpt-5
Signed-off-by: Pengpeng Hou <[email protected]>
---
Changes since v1: https://lore.kernel.org/all/[email protected]/
- rebase on current async_tx sources
- document that only ASYNC_TX_ENABLE_CHANNEL_SWITCH is generated by Kconfig

The Kconfig name and preprocessor path were reviewed statically; no DMA-
engine runtime test was performed.

 include/linux/async_tx.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/include/linux/async_tx.h b/include/linux/async_tx.h
index 1ca9f9e05f4f..1659a06c034b 100644
--- a/include/linux/async_tx.h
+++ b/include/linux/async_tx.h
@@ -74,7 +74,7 @@ struct async_submit_ctl {
 	void *scribble;
 };
 
-#if defined(CONFIG_DMA_ENGINE) && !defined(CONFIG_ASYNC_TX_CHANNEL_SWITCH)
+#if defined(CONFIG_DMA_ENGINE) && !defined(CONFIG_ASYNC_TX_ENABLE_CHANNEL_SWITCH)
 #define async_tx_issue_pending_all dma_issue_pending_all
 
 /**
-- 
2.50.1 (Apple Git-155)
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.