Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

mmc: sdhci-*: Don't emit error msg if sdhci_add_host() fails

I noticed below error msg with sdhci-pxav3 on some berlin platforms:

[.....] sdhci-pxav3 f7ab0000.sdhci failed to add host

It is due to getting related vmmc or vqmmc regulator returns
-EPROBE_DEFER. It doesn't matter at all but it's confusing.

>From another side, if driver probing fails and the error number isn't
-EPROBE_DEFER, the core will tell us something as below:

[.....] sdhci-pxav3: probe of f7ab0000.sdhci failed with error -EXX

So it's not necessary to emit error msg if sdhci_add_host() fails. And
some other sdhci host drivers also have this issue, let's fix them
together.

Signed-off-by: Jisheng Zhang <Jisheng.Zhang@synaptics.com>
Acked-by: Adrian Hunter <adrian.hunter@intel.com>
Acked-by: Viresh Kumar <viresh.kumar@linaro.org>
Acked-by: Patrice Chotard <patrice.chotard@st.com>
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>

authored by

Jisheng Zhang and committed by
Ulf Hansson
fb8617e1 a0d47665

+7 -21
+1 -3
drivers/mmc/host/sdhci-bcm-kona.c
··· 284 284 sdhci_bcm_kona_sd_init(host); 285 285 286 286 ret = sdhci_add_host(host); 287 - if (ret) { 288 - dev_err(dev, "Failed sdhci_add_host\n"); 287 + if (ret) 289 288 goto err_reset; 290 - } 291 289 292 290 /* if device is eMMC, emulate card insert right here */ 293 291 if (!mmc_card_is_removable(host->mmc)) {
+1 -3
drivers/mmc/host/sdhci-pic32.c
··· 200 200 } 201 201 202 202 ret = sdhci_add_host(host); 203 - if (ret) { 204 - dev_err(&pdev->dev, "error adding host\n"); 203 + if (ret) 205 204 goto err_base_clk; 206 - } 207 205 208 206 dev_info(&pdev->dev, "Successfully added sdhci host\n"); 209 207 return 0;
+1 -3
drivers/mmc/host/sdhci-pxav2.c
··· 221 221 host->ops = &pxav2_sdhci_ops; 222 222 223 223 ret = sdhci_add_host(host); 224 - if (ret) { 225 - dev_err(&pdev->dev, "failed to add host\n"); 224 + if (ret) 226 225 goto disable_clk; 227 - } 228 226 229 227 return 0; 230 228
+1 -3
drivers/mmc/host/sdhci-pxav3.c
··· 472 472 pm_suspend_ignore_children(&pdev->dev, 1); 473 473 474 474 ret = sdhci_add_host(host); 475 - if (ret) { 476 - dev_err(&pdev->dev, "failed to add host\n"); 475 + if (ret) 477 476 goto err_add_host; 478 - } 479 477 480 478 if (host->mmc->pm_caps & MMC_PM_WAKE_SDIO_IRQ) 481 479 device_init_wakeup(&pdev->dev, 1);
+1 -3
drivers/mmc/host/sdhci-s3c.c
··· 655 655 goto err_req_regs; 656 656 657 657 ret = sdhci_add_host(host); 658 - if (ret) { 659 - dev_err(dev, "sdhci_add_host() failed\n"); 658 + if (ret) 660 659 goto err_req_regs; 661 - } 662 660 663 661 #ifdef CONFIG_PM 664 662 if (pdata->cd_type != S3C_SDHCI_CD_INTERNAL)
+1 -3
drivers/mmc/host/sdhci-spear.c
··· 126 126 } 127 127 128 128 ret = sdhci_add_host(host); 129 - if (ret) { 130 - dev_dbg(&pdev->dev, "error adding host\n"); 129 + if (ret) 131 130 goto disable_clk; 132 - } 133 131 134 132 platform_set_drvdata(pdev, host); 135 133
+1 -3
drivers/mmc/host/sdhci-st.c
··· 422 422 st_mmcss_cconfig(np, host); 423 423 424 424 ret = sdhci_add_host(host); 425 - if (ret) { 426 - dev_err(&pdev->dev, "Failed sdhci_add_host\n"); 425 + if (ret) 427 426 goto err_out; 428 - } 429 427 430 428 host_version = readw_relaxed((host->ioaddr + SDHCI_HOST_VERSION)); 431 429