[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <20240613150626.25280-1-jason-jh.lin@mediatek.com>
Date: Thu, 13 Jun 2024 23:06:26 +0800
From: Jason-JH.Lin <jason-jh.lin@...iatek.com>
To: Jassi Brar <jassisinghbrar@...il.com>, Chun-Kuang Hu
<chunkuang.hu@...nel.org>, AngeloGioacchino Del Regno
<angelogioacchino.delregno@...labora.com>
CC: Matthias Brugger <matthias.bgg@...il.com>, "Jason-JH . Lin"
<jason-jh.lin@...iatek.com>, Singo Chang <singo.chang@...iatek.com>, Nancy
Lin <nancy.lin@...iatek.com>, <linux-kernel@...r.kernel.org>,
<linux-arm-kernel@...ts.infradead.org>, <linux-mediatek@...ts.infradead.org>,
<Project_Global_Chrome_Upstream_Group@...iatek.com>
Subject: [PATCH] mailbox: mtk-cmdq: Add unregister mailbox controller in cmdq_remove()
Add unregister mailbox controller in cmdq_remove to fix cmdq unbind
WARN_ON message from pm_runtime_get_sync() in cmdq_mbox_shutdown().
Fixes: 623a6143a845 ("mailbox: mediatek: Add Mediatek CMDQ driver")
Signed-off-by: Jason-JH.Lin <jason-jh.lin@...iatek.com>
---
drivers/mailbox/mtk-cmdq-mailbox.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/drivers/mailbox/mtk-cmdq-mailbox.c b/drivers/mailbox/mtk-cmdq-mailbox.c
index 4aa394e91109..1399e18a39a4 100644
--- a/drivers/mailbox/mtk-cmdq-mailbox.c
+++ b/drivers/mailbox/mtk-cmdq-mailbox.c
@@ -371,6 +371,8 @@ static void cmdq_remove(struct platform_device *pdev)
{
struct cmdq *cmdq = platform_get_drvdata(pdev);
+ devm_mbox_controller_unregister(&pdev->dev, &cmdq->mbox);
+
if (cmdq->pdata->sw_ddr_en)
cmdq_sw_ddr_enable(cmdq, false);
--
2.18.0
Powered by blists - more mailing lists