mirror of https://github.com/torvalds/linux.git
mmc: sdhci-esdhc-mcf: 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. Acked-by: Angelo Dureghello <adureghello@baylibre.com> Signed-off-by: Binbin Zhou <zhoubinbin@loongson.cn> Link: https://lore.kernel.org/r/3843af6a7726d8879e5cba02e0321e08c8908328.1749127796.git.zhoubinbin@loongson.cn Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
This commit is contained in:
parent
06d7faf7b4
commit
eb270f417c
|
|
@ -426,28 +426,22 @@ static int sdhci_esdhc_mcf_probe(struct platform_device *pdev)
|
||||||
host->flags |= SDHCI_AUTO_CMD12;
|
host->flags |= SDHCI_AUTO_CMD12;
|
||||||
|
|
||||||
mcf_data->clk_ipg = devm_clk_get(&pdev->dev, "ipg");
|
mcf_data->clk_ipg = devm_clk_get(&pdev->dev, "ipg");
|
||||||
if (IS_ERR(mcf_data->clk_ipg)) {
|
if (IS_ERR(mcf_data->clk_ipg))
|
||||||
err = PTR_ERR(mcf_data->clk_ipg);
|
return PTR_ERR(mcf_data->clk_ipg);
|
||||||
goto err_exit;
|
|
||||||
}
|
|
||||||
|
|
||||||
mcf_data->clk_ahb = devm_clk_get(&pdev->dev, "ahb");
|
mcf_data->clk_ahb = devm_clk_get(&pdev->dev, "ahb");
|
||||||
if (IS_ERR(mcf_data->clk_ahb)) {
|
if (IS_ERR(mcf_data->clk_ahb))
|
||||||
err = PTR_ERR(mcf_data->clk_ahb);
|
return PTR_ERR(mcf_data->clk_ahb);
|
||||||
goto err_exit;
|
|
||||||
}
|
|
||||||
|
|
||||||
mcf_data->clk_per = devm_clk_get(&pdev->dev, "per");
|
mcf_data->clk_per = devm_clk_get(&pdev->dev, "per");
|
||||||
if (IS_ERR(mcf_data->clk_per)) {
|
if (IS_ERR(mcf_data->clk_per))
|
||||||
err = PTR_ERR(mcf_data->clk_per);
|
return PTR_ERR(mcf_data->clk_per);
|
||||||
goto err_exit;
|
|
||||||
}
|
|
||||||
|
|
||||||
pltfm_host->clk = mcf_data->clk_per;
|
pltfm_host->clk = mcf_data->clk_per;
|
||||||
pltfm_host->clock = clk_get_rate(pltfm_host->clk);
|
pltfm_host->clock = clk_get_rate(pltfm_host->clk);
|
||||||
err = clk_prepare_enable(mcf_data->clk_per);
|
err = clk_prepare_enable(mcf_data->clk_per);
|
||||||
if (err)
|
if (err)
|
||||||
goto err_exit;
|
return err;
|
||||||
|
|
||||||
err = clk_prepare_enable(mcf_data->clk_ipg);
|
err = clk_prepare_enable(mcf_data->clk_ipg);
|
||||||
if (err)
|
if (err)
|
||||||
|
|
@ -485,9 +479,6 @@ static int sdhci_esdhc_mcf_probe(struct platform_device *pdev)
|
||||||
clk_disable_unprepare(mcf_data->clk_ipg);
|
clk_disable_unprepare(mcf_data->clk_ipg);
|
||||||
unprep_per:
|
unprep_per:
|
||||||
clk_disable_unprepare(mcf_data->clk_per);
|
clk_disable_unprepare(mcf_data->clk_per);
|
||||||
err_exit:
|
|
||||||
sdhci_pltfm_free(pdev);
|
|
||||||
|
|
||||||
return err;
|
return err;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -502,8 +493,6 @@ static void sdhci_esdhc_mcf_remove(struct platform_device *pdev)
|
||||||
clk_disable_unprepare(mcf_data->clk_ipg);
|
clk_disable_unprepare(mcf_data->clk_ipg);
|
||||||
clk_disable_unprepare(mcf_data->clk_ahb);
|
clk_disable_unprepare(mcf_data->clk_ahb);
|
||||||
clk_disable_unprepare(mcf_data->clk_per);
|
clk_disable_unprepare(mcf_data->clk_per);
|
||||||
|
|
||||||
sdhci_pltfm_free(pdev);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static struct platform_driver sdhci_esdhc_mcf_driver = {
|
static struct platform_driver sdhci_esdhc_mcf_driver = {
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue