From: Frank Li <Frank.li@oss.nxp.com>
To: Tian Xuechen <202300460064@mail.sdu.edu.cn>
Cc: vkoul@kernel.org, Frank.Li@kernel.org, dmaengine@vger.kernel.org,
amelie.delaunay@foss.st.com, mcoquelin.stm32@gmail.com,
alexandre.torgue@foss.st.com, cedric.madianga@gmail.com,
pierre-yves.mordret@st.com,
linux-stm32@st-md-mailman.stormreply.com,
linux-arm-kernel@lists.infradead.org
Subject: Re: [PATCH v3 6/7] dmaengine: stm32-dmamux: Use managed DMA router registration
Date: Fri, 4 Dec 2026 11:57:00 -0600 [thread overview]
Message-ID: <axL-7CPQc9F8K9Dh@SMW015318> (raw)
In-Reply-To: <20261204121630.1720746-7-202300460064@mail.sdu.edu.cn>
On Fri, Dec 04, 2026 at 08:16:29PM +0800, Tian Xuechen wrote:
> The STM32 DMAMUX registers an OF DMA router backed by managed driver
> data. The router entry can outlive that data when the device is
> detached.
>
> Use devm_of_dma_router_register() to remove the entry before devres
> releases the router data. Keep the probe error unwind for runtime PM
> and clocks when registration fails.
>
> Fixes: df7e762db5f6 ("dmaengine: Add STM32 DMAMUX driver")
> Cc: stable+noautosel@kernel.org # relies on new API
> Signed-off-by: Tian Xuechen <202300460064@mail.sdu.edu.cn>
> ---
Reviewed-by: Frank Li <Frank.Li@nxp.com>
> drivers/dma/stm32/stm32-dmamux.c | 5 +++--
> 1 file changed, 3 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/dma/stm32/stm32-dmamux.c b/drivers/dma/stm32/stm32-dmamux.c
> index b3cacd57b..3cb9d4051 100644
> --- a/drivers/dma/stm32/stm32-dmamux.c
> +++ b/drivers/dma/stm32/stm32-dmamux.c
> @@ -290,8 +290,9 @@ static int stm32_dmamux_probe(struct platform_device *pdev)
>
> pm_runtime_put(&pdev->dev);
>
> - ret = of_dma_router_register(node, stm32_dmamux_route_allocate,
> - &stm32_dmamux->dmarouter);
> + ret = devm_of_dma_router_register(&pdev->dev, node,
> + stm32_dmamux_route_allocate,
> + &stm32_dmamux->dmarouter);
> if (ret)
> goto pm_disable;
>
next prev parent reply other threads:[~2026-12-04 17:57 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-12-04 12:16 [PATCH v3 0/7] dmaengine: Manage OF DMA routers and disable STM32 unbind Tian Xuechen
2026-12-04 12:16 ` [PATCH v3 1/7] dmaengine: of: Add managed DMA router registration Tian Xuechen
2026-12-04 17:54 ` Frank Li
2026-12-04 12:16 ` [PATCH v3 2/7] dmaengine: lpc18xx-dmamux: Use " Tian Xuechen
2026-12-04 12:16 ` [PATCH v3 3/7] dmaengine: lpc32xx-dmamux: " Tian Xuechen
2026-12-04 12:16 ` [PATCH v3 4/7] dmaengine: dw: dmamux: " Tian Xuechen
2026-12-04 17:55 ` Frank Li
2026-12-04 12:16 ` [PATCH v3 5/7] dmaengine: stm32: Disable manual bind and unbind Tian Xuechen
2026-12-04 17:56 ` Frank Li
2026-12-04 12:16 ` [PATCH v3 6/7] dmaengine: stm32-dmamux: Use managed DMA router registration Tian Xuechen
2026-12-04 17:57 ` Frank Li [this message]
2026-12-04 12:16 ` [PATCH v3 7/7] dmaengine: ti-dma-crossbar: " Tian Xuechen
2026-12-04 17:57 ` Frank Li
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=axL-7CPQc9F8K9Dh@SMW015318 \
--to=frank.li@oss.nxp.com \
--cc=202300460064@mail.sdu.edu.cn \
--cc=Frank.Li@kernel.org \
--cc=alexandre.torgue@foss.st.com \
--cc=amelie.delaunay@foss.st.com \
--cc=cedric.madianga@gmail.com \
--cc=dmaengine@vger.kernel.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-stm32@st-md-mailman.stormreply.com \
--cc=mcoquelin.stm32@gmail.com \
--cc=pierre-yves.mordret@st.com \
--cc=vkoul@kernel.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox