]> git.ipfire.org Git - thirdparty/kernel/stable.git/commitdiff
mmc: sdhci-spear: Drop the use of sdhci_free_host()
authorBinbin Zhou <zhoubinbin@loongson.cn>
Sat, 7 Jun 2025 07:35:42 +0000 (15:35 +0800)
committerUlf Hansson <ulf.hansson@linaro.org>
Tue, 24 Jun 2025 10:43:24 +0000 (12:43 +0200)
Since the devm_mmc_alloc_host() helper is already in use,
sdhci_free_host() is no longer needed.

Signed-off-by: Binbin Zhou <zhoubinbin@loongson.cn>
Link: https://lore.kernel.org/r/fde959d1021c165ede971644f3db7e06ce7c6180.1749127796.git.zhoubinbin@loongson.cn
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
drivers/mmc/host/sdhci-spear.c

index 770dc12b9ae92d1c020ea05a9189aa20d855b043..fa0f8aeb7ee0e81ef3c720dcec09afb972c85804 100644 (file)
@@ -59,7 +59,7 @@ static int sdhci_probe(struct platform_device *pdev)
        if (IS_ERR(host->ioaddr)) {
                ret = PTR_ERR(host->ioaddr);
                dev_dbg(&pdev->dev, "unable to map iomem: %d\n", ret);
-               goto err_host;
+               goto err;
        }
 
        host->hw_name = "sdhci";
@@ -67,7 +67,7 @@ static int sdhci_probe(struct platform_device *pdev)
        host->irq = platform_get_irq(pdev, 0);
        if (host->irq < 0) {
                ret = host->irq;
-               goto err_host;
+               goto err;
        }
        host->quirks = SDHCI_QUIRK_BROKEN_ADMA;
 
@@ -78,13 +78,13 @@ static int sdhci_probe(struct platform_device *pdev)
        if (IS_ERR(sdhci->clk)) {
                ret = PTR_ERR(sdhci->clk);
                dev_dbg(&pdev->dev, "Error getting clock\n");
-               goto err_host;
+               goto err;
        }
 
        ret = clk_prepare_enable(sdhci->clk);
        if (ret) {
                dev_dbg(&pdev->dev, "Error enabling clock\n");
-               goto err_host;
+               goto err;
        }
 
        ret = clk_set_rate(sdhci->clk, 50000000);
@@ -110,8 +110,6 @@ static int sdhci_probe(struct platform_device *pdev)
 
 disable_clk:
        clk_disable_unprepare(sdhci->clk);
-err_host:
-       sdhci_free_host(host);
 err:
        dev_err(&pdev->dev, "spear-sdhci probe failed: %d\n", ret);
        return ret;
@@ -130,7 +128,6 @@ static void sdhci_remove(struct platform_device *pdev)
 
        sdhci_remove_host(host, dead);
        clk_disable_unprepare(sdhci->clk);
-       sdhci_free_host(host);
 }
 
 #ifdef CONFIG_PM_SLEEP