mmc: sdhci-of-dwcmshc: Drop the use of sdhci_pltfm_free()

Since the devm_mmc_alloc_host() helper is already in use,
sdhci_pltfm_free() is no longer needed.

Signed-off-by: Binbin Zhou <zhoubinbin@loongson.cn>
Link: https://lore.kernel.org/r/01b6797d55562e124599663e859dd9b7d4e4d8e0.1749127796.git.zhoubinbin@loongson.cn
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
This commit is contained in:
Binbin Zhou 2025-06-07 15:39:01 +08:00 committed by Ulf Hansson
parent 6cb3aeccf6
commit 91a001a1a0

View File

@ -1387,14 +1387,13 @@ static int dwcmshc_probe(struct platform_device *pdev)
if (dev->of_node) {
pltfm_host->clk = devm_clk_get(dev, "core");
if (IS_ERR(pltfm_host->clk)) {
err = PTR_ERR(pltfm_host->clk);
dev_err(dev, "failed to get core clk: %d\n", err);
goto free_pltfm;
}
if (IS_ERR(pltfm_host->clk))
return dev_err_probe(dev, PTR_ERR(pltfm_host->clk),
"failed to get core clk\n");
err = clk_prepare_enable(pltfm_host->clk);
if (err)
goto free_pltfm;
return err;
priv->bus_clk = devm_clk_get(dev, "bus");
if (!IS_ERR(priv->bus_clk))
@ -1467,8 +1466,6 @@ static int dwcmshc_probe(struct platform_device *pdev)
clk_disable_unprepare(pltfm_host->clk);
clk_disable_unprepare(priv->bus_clk);
clk_bulk_disable_unprepare(priv->num_other_clks, priv->other_clks);
free_pltfm:
sdhci_pltfm_free(pdev);
return err;
}
@ -1500,7 +1497,6 @@ static void dwcmshc_remove(struct platform_device *pdev)
clk_disable_unprepare(pltfm_host->clk);
clk_disable_unprepare(priv->bus_clk);
clk_bulk_disable_unprepare(priv->num_other_clks, priv->other_clks);
sdhci_pltfm_free(pdev);
}
#ifdef CONFIG_PM_SLEEP