[PATCHv2 9/9] dmaengine: mv_xor: add missing platform remove function
From: Rosen Penev
Date: Thu Jun 11 2026 - 17:12:04 EST
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@xxxxxxxxx>
---
drivers/dma/mv_xor.c | 11 +++++++++++
1 file changed, 11 insertions(+)
diff --git a/drivers/dma/mv_xor.c b/drivers/dma/mv_xor.c
index 255df2dd9c71..85cb77022144 100644
--- a/drivers/dma/mv_xor.c
+++ b/drivers/dma/mv_xor.c
@@ -1446,8 +1446,19 @@ 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]);
+}
+
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