mmc: sdhci-pxav2: 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/b4f833b5f4816cfe5b9e502d55aad6a970042aad.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:50:46 +08:00 committed by Ulf Hansson
parent 3a55e989bb
commit 072f5e2c34
1 changed files with 6 additions and 20 deletions

View File

@ -258,7 +258,6 @@ static int sdhci_pxav2_probe(struct platform_device *pdev)
struct sdhci_host *host = NULL; struct sdhci_host *host = NULL;
const struct sdhci_pxa_variant *variant; const struct sdhci_pxa_variant *variant;
int ret;
struct clk *clk, *clk_core; struct clk *clk, *clk_core;
host = sdhci_pltfm_init(pdev, NULL, sizeof(*pxav2_host)); host = sdhci_pltfm_init(pdev, NULL, sizeof(*pxav2_host));
@ -271,19 +270,14 @@ static int sdhci_pxav2_probe(struct platform_device *pdev)
clk = devm_clk_get_optional_enabled(dev, "io"); clk = devm_clk_get_optional_enabled(dev, "io");
if (!clk) if (!clk)
clk = devm_clk_get_enabled(dev, NULL); clk = devm_clk_get_enabled(dev, NULL);
if (IS_ERR(clk)) { if (IS_ERR(clk))
ret = PTR_ERR(clk); return dev_err_probe(dev, PTR_ERR(clk), "failed to get io clock\n");
dev_err_probe(dev, ret, "failed to get io clock\n");
goto free;
}
pltfm_host->clk = clk; pltfm_host->clk = clk;
clk_core = devm_clk_get_optional_enabled(dev, "core"); clk_core = devm_clk_get_optional_enabled(dev, "core");
if (IS_ERR(clk_core)) { if (IS_ERR(clk_core))
ret = PTR_ERR(clk_core); return dev_err_probe(dev, PTR_ERR(clk_core),
dev_err_probe(dev, ret, "failed to enable core clock\n"); "failed to enable core clock\n");
goto free;
}
host->quirks = SDHCI_QUIRK_BROKEN_ADMA host->quirks = SDHCI_QUIRK_BROKEN_ADMA
| SDHCI_QUIRK_BROKEN_TIMEOUT_VAL | SDHCI_QUIRK_BROKEN_TIMEOUT_VAL
@ -332,15 +326,7 @@ static int sdhci_pxav2_probe(struct platform_device *pdev)
pxav2_host->pinctrl = NULL; pxav2_host->pinctrl = NULL;
} }
ret = sdhci_add_host(host); return sdhci_add_host(host);
if (ret)
goto free;
return 0;
free:
sdhci_pltfm_free(pdev);
return ret;
} }
static struct platform_driver sdhci_pxav2_driver = { static struct platform_driver sdhci_pxav2_driver = {