]> git.itanic.dy.fi Git - linux-stable/commit
dmaengine: dw-edma: Prepare dw_edma_probe() for builtin callers
authorSerge Semin <Sergey.Semin@baikalelectronics.ru>
Fri, 13 Jan 2023 17:14:06 +0000 (20:14 +0300)
committerBjorn Helgaas <bhelgaas@google.com>
Wed, 22 Feb 2023 19:46:09 +0000 (13:46 -0600)
commit3bc0f149405e07c7e59985a24ce96db83973f8d7
tree224ce6d6e036778e54629ac484c730b062644f05
parentacf994151dd9a59d544b5d3c196b64f326d94c52
dmaengine: dw-edma: Prepare dw_edma_probe() for builtin callers

When CONFIG_DW_EDMA=m, dw_edma_probe() is built as a module.  Previously
edma.h declared it as extern, but the implementation isn't available for
builtin callers.  A subsequent commit will add calls from
dw_pcie_host_init() and dw_pcie_ep_init(), which can only be built-in.

Make it safe for such builtin callers to call dw_edma_probe() by using
IS_REACHABLE() to define a stub when CONFIG_DW_EDMA=m.

When CONFIG_DW_EDMA=m, these builtin callers will fail to detect and
register eDMA devices, so eDMA won't be usable even if the dw-edma module
is loaded.

[bhelgaas: split to separate patch, commit log]
Link: https://lore.kernel.org/r/20230113171409.30470-25-Sergey.Semin@baikalelectronics.ru
Signed-off-by: Serge Semin <Sergey.Semin@baikalelectronics.ru>
Signed-off-by: Lorenzo Pieralisi <lpieralisi@kernel.org>
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
Acked-by: Vinod Koul <vkoul@kernel.org>
include/linux/dma/edma.h