mmc: sdhci-of-ma35d1: 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: Jacky Huang <ychuang3@nuvoton.com>
Cc: Shan-Chun Hung <schung@nuvoton.com>
Signed-off-by: Binbin Zhou <zhoubinbin@loongson.cn>
Link: https://lore.kernel.org/r/67a2a3b35e2d46aab06657e88566c14a7f2d7947.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:48:35 +08:00 committed by Ulf Hansson
parent da94d533ec
commit 01bc623f9a
1 changed files with 8 additions and 15 deletions

View File

@ -211,20 +211,18 @@ static int ma35_probe(struct platform_device *pdev)
priv = sdhci_pltfm_priv(pltfm_host); priv = sdhci_pltfm_priv(pltfm_host);
pltfm_host->clk = devm_clk_get_optional_enabled(dev, NULL); pltfm_host->clk = devm_clk_get_optional_enabled(dev, NULL);
if (IS_ERR(pltfm_host->clk)) { if (IS_ERR(pltfm_host->clk))
err = dev_err_probe(dev, PTR_ERR(pltfm_host->clk), "failed to get clk\n"); return dev_err_probe(dev, PTR_ERR(pltfm_host->clk),
goto err_sdhci; "failed to get clk\n");
}
err = mmc_of_parse(host->mmc); err = mmc_of_parse(host->mmc);
if (err) if (err)
goto err_sdhci; return err;
priv->rst = devm_reset_control_get_exclusive(dev, NULL); priv->rst = devm_reset_control_get_exclusive(dev, NULL);
if (IS_ERR(priv->rst)) { if (IS_ERR(priv->rst))
err = dev_err_probe(dev, PTR_ERR(priv->rst), "failed to get reset control\n"); return dev_err_probe(dev, PTR_ERR(priv->rst),
goto err_sdhci; "failed to get reset control\n");
}
sdhci_get_of_property(pdev); sdhci_get_of_property(pdev);
@ -255,7 +253,7 @@ static int ma35_probe(struct platform_device *pdev)
err = sdhci_add_host(host); err = sdhci_add_host(host);
if (err) if (err)
goto err_sdhci; return err;
/* /*
* Split data into chunks of 16 or 8 bytes for transmission. * Split data into chunks of 16 or 8 bytes for transmission.
@ -268,10 +266,6 @@ static int ma35_probe(struct platform_device *pdev)
sdhci_writew(host, ctl, MA35_SDHCI_MBIUCTL); sdhci_writew(host, ctl, MA35_SDHCI_MBIUCTL);
return 0; return 0;
err_sdhci:
sdhci_pltfm_free(pdev);
return err;
} }
static void ma35_disable_card_clk(struct sdhci_host *host) static void ma35_disable_card_clk(struct sdhci_host *host)
@ -291,7 +285,6 @@ static void ma35_remove(struct platform_device *pdev)
sdhci_remove_host(host, 0); sdhci_remove_host(host, 0);
ma35_disable_card_clk(host); ma35_disable_card_clk(host);
sdhci_pltfm_free(pdev);
} }
static const struct of_device_id sdhci_ma35_dt_ids[] = { static const struct of_device_id sdhci_ma35_dt_ids[] = {