mmc: sdhci-of-sparx5: 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: Steen Hegelund <Steen.Hegelund@microchip.com>
Cc: Daniel Machon <daniel.machon@microchip.com>
Signed-off-by: Binbin Zhou <zhoubinbin@loongson.cn>
Acked-by: Daniel Machon <daniel.machon@microchip.com>
Link: https://lore.kernel.org/r/67b5e9076056da66d9fc8951fafd4f48ddd3ca25.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:49:32 +08:00 committed by Ulf Hansson
parent 01bc623f9a
commit ccade5236b
1 changed files with 8 additions and 16 deletions

View File

@ -185,11 +185,9 @@ static int sdhci_sparx5_probe(struct platform_device *pdev)
sdhci_sparx5->host = host; sdhci_sparx5->host = host;
pltfm_host->clk = devm_clk_get_enabled(&pdev->dev, "core"); pltfm_host->clk = devm_clk_get_enabled(&pdev->dev, "core");
if (IS_ERR(pltfm_host->clk)) { if (IS_ERR(pltfm_host->clk))
ret = PTR_ERR(pltfm_host->clk); return dev_err_probe(&pdev->dev, PTR_ERR(pltfm_host->clk),
dev_err(&pdev->dev, "failed to get and enable core clk: %d\n", ret); "failed to get and enable core clk\n");
goto free_pltfm;
}
if (!of_property_read_u32(np, "microchip,clock-delay", &value) && if (!of_property_read_u32(np, "microchip,clock-delay", &value) &&
(value > 0 && value <= MSHC_DLY_CC_MAX)) (value > 0 && value <= MSHC_DLY_CC_MAX))
@ -199,14 +197,12 @@ static int sdhci_sparx5_probe(struct platform_device *pdev)
ret = mmc_of_parse(host->mmc); ret = mmc_of_parse(host->mmc);
if (ret) if (ret)
goto free_pltfm; return ret;
sdhci_sparx5->cpu_ctrl = syscon_regmap_lookup_by_compatible(syscon); sdhci_sparx5->cpu_ctrl = syscon_regmap_lookup_by_compatible(syscon);
if (IS_ERR(sdhci_sparx5->cpu_ctrl)) { if (IS_ERR(sdhci_sparx5->cpu_ctrl))
dev_err(&pdev->dev, "No CPU syscon regmap !\n"); return dev_err_probe(&pdev->dev, PTR_ERR(sdhci_sparx5->cpu_ctrl),
ret = PTR_ERR(sdhci_sparx5->cpu_ctrl); "No CPU syscon regmap !\n");
goto free_pltfm;
}
if (sdhci_sparx5->delay_clock >= 0) if (sdhci_sparx5->delay_clock >= 0)
sparx5_set_delay(host, sdhci_sparx5->delay_clock); sparx5_set_delay(host, sdhci_sparx5->delay_clock);
@ -222,7 +218,7 @@ static int sdhci_sparx5_probe(struct platform_device *pdev)
ret = sdhci_add_host(host); ret = sdhci_add_host(host);
if (ret) if (ret)
goto free_pltfm; return ret;
/* Set AXI bus master to use un-cached access (for DMA) */ /* Set AXI bus master to use un-cached access (for DMA) */
if (host->flags & (SDHCI_USE_SDMA | SDHCI_USE_ADMA) && if (host->flags & (SDHCI_USE_SDMA | SDHCI_USE_ADMA) &&
@ -235,10 +231,6 @@ static int sdhci_sparx5_probe(struct platform_device *pdev)
mmc_hostname(host->mmc), sdhci_readl(host, MSHC2_TYPE)); mmc_hostname(host->mmc), sdhci_readl(host, MSHC2_TYPE));
return ret; return ret;
free_pltfm:
sdhci_pltfm_free(pdev);
return ret;
} }
static const struct of_device_id sdhci_sparx5_of_match[] = { static const struct of_device_id sdhci_sparx5_of_match[] = {