diff options
author | Binbin Zhou <zhoubinbin@loongson.cn> | 2025-06-07 15:52:39 +0800 |
---|---|---|
committer | Ulf Hansson <ulf.hansson@linaro.org> | 2025-06-24 12:43:25 +0200 |
commit | f9a06dfdfd5d1cd50e93e4970a3cc1cbc9d1e405 (patch) | |
tree | b1f1f0a87e2429a0154abad8ae3080cafd538578 | |
parent | 7361fb3e8c38a3868cec9118337590e3788bb175 (diff) |
mmc: sdhci-xenon: 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.
Cc: Hu Ziji <huziji@marvell.com>
Signed-off-by: Binbin Zhou <zhoubinbin@loongson.cn>
Link: https://lore.kernel.org/r/e7c52155f04fc270400985b70514800c23fd5565.1749127796.git.zhoubinbin@loongson.cn
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
-rw-r--r-- | drivers/mmc/host/sdhci-xenon.c | 15 |
1 files changed, 5 insertions, 10 deletions
diff --git a/drivers/mmc/host/sdhci-xenon.c b/drivers/mmc/host/sdhci-xenon.c index 15a76f8accea..b12bee8342bd 100644 --- a/drivers/mmc/host/sdhci-xenon.c +++ b/drivers/mmc/host/sdhci-xenon.c @@ -532,14 +532,13 @@ static int xenon_probe(struct platform_device *pdev) if (dev->of_node) { pltfm_host->clk = devm_clk_get(&pdev->dev, "core"); - if (IS_ERR(pltfm_host->clk)) { - err = PTR_ERR(pltfm_host->clk); - dev_err(&pdev->dev, "Failed to setup input clk: %d\n", err); - goto free_pltfm; - } + if (IS_ERR(pltfm_host->clk)) + return dev_err_probe(&pdev->dev, PTR_ERR(pltfm_host->clk), + "Failed to setup input clk.\n"); + err = clk_prepare_enable(pltfm_host->clk); if (err) - goto free_pltfm; + return err; priv->axi_clk = devm_clk_get(&pdev->dev, "axi"); if (IS_ERR(priv->axi_clk)) { @@ -603,8 +602,6 @@ err_clk_axi: clk_disable_unprepare(priv->axi_clk); err_clk: clk_disable_unprepare(pltfm_host->clk); -free_pltfm: - sdhci_pltfm_free(pdev); return err; } @@ -623,8 +620,6 @@ static void xenon_remove(struct platform_device *pdev) xenon_sdhc_unprepare(host); clk_disable_unprepare(priv->axi_clk); clk_disable_unprepare(pltfm_host->clk); - - sdhci_pltfm_free(pdev); } #ifdef CONFIG_PM_SLEEP |