From: Stephen Boyd <sboyd@kernel.org>
To: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: Fei Shao <fshao@chromium.org>,
linux-kernel@vger.kernel.org, patches@lists.linux.dev,
AngeloGioacchino Del Regno
<angelogioacchino.delregno@collabora.com>
Subject: [PATCH 5/8] spmi: mtk-pmif: Reorder driver remove sequence
Date: Wed, 6 Dec 2023 15:17:28 -0800 [thread overview]
Message-ID: <20231206231733.4031901-6-sboyd@kernel.org> (raw)
In-Reply-To: <20231206231733.4031901-1-sboyd@kernel.org>
From: Fei Shao <fshao@chromium.org>
This driver enables clocks and then adds SPMI controller in probing, so
we expect the reversed sequence in removal.
Fix the order in the remove callback.
Signed-off-by: Fei Shao <fshao@chromium.org>
Link: https://lore.kernel.org/r/20230824104101.4083400-4-fshao@chromium.org
Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
Signed-off-by: Stephen Boyd <sboyd@kernel.org>
---
drivers/spmi/spmi-mtk-pmif.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/spmi/spmi-mtk-pmif.c b/drivers/spmi/spmi-mtk-pmif.c
index 6ebc6901490a..cc660da6a037 100644
--- a/drivers/spmi/spmi-mtk-pmif.c
+++ b/drivers/spmi/spmi-mtk-pmif.c
@@ -515,9 +515,9 @@ static void mtk_spmi_remove(struct platform_device *pdev)
struct spmi_controller *ctrl = platform_get_drvdata(pdev);
struct pmif *arb = spmi_controller_get_drvdata(ctrl);
+ spmi_controller_remove(ctrl);
clk_bulk_disable_unprepare(arb->nclks, arb->clks);
clk_bulk_put(arb->nclks, arb->clks);
- spmi_controller_remove(ctrl);
}
static const struct of_device_id mtk_spmi_match_table[] = {
--
https://git.kernel.org/pub/scm/linux/kernel/git/clk/linux.git/
https://git.kernel.org/pub/scm/linux/kernel/git/sboyd/spmi.git
next prev parent reply other threads:[~2023-12-06 23:17 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-12-06 23:17 [PATCH 0/8] SPMI patches for the merge window Stephen Boyd
2023-12-06 23:17 ` [PATCH 1/8] spmi: mtk-pmif: Serialize PMIF status check and command submission Stephen Boyd
2023-12-15 16:12 ` Greg Kroah-Hartman
2023-12-06 23:17 ` [PATCH 2/8] spmi: mediatek: Fix UAF on device remove Stephen Boyd
2023-12-06 23:17 ` [PATCH 3/8] spmi: Introduce device-managed functions Stephen Boyd
2023-12-06 23:17 ` [PATCH 4/8] spmi: Use devm_spmi_controller_alloc() Stephen Boyd
2023-12-06 23:17 ` Stephen Boyd [this message]
2023-12-06 23:17 ` [PATCH 6/8] spmi: hisi-spmi-controller: Use devm_spmi_controller_add() Stephen Boyd
2023-12-06 23:17 ` [PATCH 7/8] spmi: Return meaningful errors in spmi_controller_alloc() Stephen Boyd
2023-12-06 23:17 ` [PATCH 8/8] spmi: mediatek: add device id check Stephen Boyd
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=20231206231733.4031901-6-sboyd@kernel.org \
--to=sboyd@kernel.org \
--cc=angelogioacchino.delregno@collabora.com \
--cc=fshao@chromium.org \
--cc=gregkh@linuxfoundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=patches@lists.linux.dev \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.