From: Rosen Penev <rosenp@gmail.com>
To: dmaengine@vger.kernel.org
Cc: Vinod Koul <vkoul@kernel.org>, Frank Li <Frank.Li@kernel.org>,
linux-kernel@vger.kernel.org (open list)
Subject: [PATCH 2/3] dma: mv_xor: add missing platform remove function
Date: Tue, 9 Jun 2026 23:57:36 -0700 [thread overview]
Message-ID: <20260610065737.118211-3-rosenp@gmail.com> (raw)
In-Reply-To: <20260610065737.118211-1-rosenp@gmail.com>
The driver was missing a remove callback, so channels, DMA
devices, and IRQs were never cleaned up on driver unbind.
Implement mv_xor_remove to undo probe, patterned after the
existing error path.
Assisted-by: opencode:big-pickle
Signed-off-by: Rosen Penev <rosenp@gmail.com>
---
drivers/dma/mv_xor.c | 14 ++++++++++++++
1 file changed, 14 insertions(+)
diff --git a/drivers/dma/mv_xor.c b/drivers/dma/mv_xor.c
index a97fa0038652..3fc39cca7cbd 100644
--- a/drivers/dma/mv_xor.c
+++ b/drivers/dma/mv_xor.c
@@ -1452,8 +1452,22 @@ static int mv_xor_probe(struct platform_device *pdev)
return ret;
}
+static void mv_xor_remove(struct platform_device *pdev)
+{
+ struct mv_xor_device *xordev = platform_get_drvdata(pdev);
+ int i;
+
+ for (i = 0; i < MV_XOR_MAX_CHANNELS; i++)
+ if (xordev->channels[i]) {
+ mv_xor_channel_remove(xordev->channels[i]);
+ if (pdev->dev.of_node)
+ irq_dispose_mapping(xordev->channels[i]->irq);
+ }
+}
+
static struct platform_driver mv_xor_driver = {
.probe = mv_xor_probe,
+ .remove = mv_xor_remove,
.suspend = mv_xor_suspend,
.resume = mv_xor_resume,
.driver = {
--
2.54.0
next prev parent reply other threads:[~2026-06-10 6:57 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-06-10 6:57 [PATCH 0/3] dma: mv_xor: convert to devm resource management Rosen Penev
2026-06-10 6:57 ` [PATCH 1/3] dma: mv_xor: use devm_clk_get_optional_enabled Rosen Penev
2026-06-10 7:13 ` sashiko-bot
2026-06-10 6:57 ` Rosen Penev [this message]
2026-06-10 9:10 ` [PATCH 2/3] dma: mv_xor: add missing platform remove function sashiko-bot
2026-06-10 6:57 ` [PATCH 3/3] dma: mv_xor: use devm for dma pool and irq Rosen Penev
2026-06-10 7:12 ` sashiko-bot
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=20260610065737.118211-3-rosenp@gmail.com \
--to=rosenp@gmail.com \
--cc=Frank.Li@kernel.org \
--cc=dmaengine@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--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