Message ID | 20230824104101.4083400-4-fshao@chromium.org (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | spmi: Add and use managed resource helpers | expand |
Il 24/08/23 12:40, Fei Shao ha scritto: > 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> Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
diff --git a/drivers/spmi/spmi-mtk-pmif.c b/drivers/spmi/spmi-mtk-pmif.c index eb909a6e3b9e..2127bbd2f856 100644 --- a/drivers/spmi/spmi-mtk-pmif.c +++ b/drivers/spmi/spmi-mtk-pmif.c @@ -503,9 +503,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[] = {
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> --- drivers/spmi/spmi-mtk-pmif.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)