mmc: tegra: suppress errors when probe is deferred
Subsystems (3)
PATCH 1/1 mmc: tegra: suppress errors when probe is deferred
Don't print error message when clk_get() returns -EPROBE_DEFER. On recent Tegra chips (t186 onwards), the clocks are provided by auxiliary microprocessor (bpmp) and until the driver for it is probed clocks are not available.
While at it, change the real error message more meaningful.
--- drivers/mmc/host/sdhci-tegra.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)
drivers/mmc/host/sdhci-tegra.c +3 -1
@@ -501,8 +501,10 @@ static int sdhci_tegra_probe(struct platform_device *pdev) clk =devm_clk_get (mmc_dev (host->mmc),NULL );if (IS_ERR (clk)) { -dev_err (mmc_dev (host->mmc),"clk err\n" ); rc =PTR_ERR (clk); +if (rc != -EPROBE_DEFER ) +dev_err (&pdev->dev, +"failed to get controller clock: %d\n" , rc); goto err_clk_get; }clk_prepare_enable (clk);
Signature · 1 line
2.7.4
Quoted 8 lines · Timo Alho
Don't print error message when
clk_get()returns -EPROBE_DEFER. On recent Tegra chips (t186 onwards), the clocks are provided by auxiliary microprocessor (bpmp) and until the driver for it is probed clocks are not available.While at it, change the real error message more meaningful.
Signed-off-by Timo Alho <[email protected]>
One comment below, nevertheless:
Quoted 9 lines
--- drivers/mmc/host/sdhci-tegra.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)drivers/mmc/host/sdhci-tegra.c +0
-0
drivers/mmc/host/sdhci-tegra.c static int sdhci_tegra_probe(struct platform_device *pdev) · line 506
Quoted 7 lines
drivers/mmc/host/sdhci-tegra.c +2
-1@@ -501,8 +501,10 @@ static int sdhci_tegra_probe(struct platform_device *pdev) clk =devm_clk_get (mmc_dev (host->mmc),NULL );if (IS_ERR (clk)) { -dev_err (mmc_dev (host->mmc),"clk err\n" ); rc =PTR_ERR (clk); +if (rc != -EPROBE_DEFER ) + dev_err(&pdev->dev,
Looks a bit weird sometimes using mmc_dev(host->mmc) and sometimes &pdev->dev.
Quoted 5 lines
drivers/mmc/host/sdhci-tegra.c +1
-0+ "failed to get controller clock: %d\n", rc); goto err_clk_get; }clk_prepare_enable (clk);
Quoted 17 lines · Timo Alho
Don't print error message when
clk_get()returns -EPROBE_DEFER. On recent Tegra chips (t186 onwards), the clocks are provided by auxiliary microprocessor (bpmp) and until the driver for it is probed clocks are not available.While at it, change the real error message more meaningful.
Signed-off-by Timo Alho <[email protected]>--- drivers/mmc/host/sdhci-tegra.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)drivers/mmc/host/sdhci-tegra.c +0
-0
drivers/mmc/host/sdhci-tegra.c static int sdhci_tegra_probe(struct platform_device *pdev) · line 507
Quoted 8 lines
drivers/mmc/host/sdhci-tegra.c +3
-1@@ -501,8 +501,10 @@ static int sdhci_tegra_probe(struct platform_device *pdev) clk =devm_clk_get (mmc_dev (host->mmc),NULL );if (IS_ERR (clk)) { -dev_err (mmc_dev (host->mmc),"clk err\n" ); rc =PTR_ERR (clk); +if (rc != -EPROBE_DEFER ) +dev_err (&pdev->dev, +"failed to get controller clock: %d\n" , rc);
There is no need to print an error in any case, as the common clk framework deals with relevant error printing.
Quoted 6 lines
drivers/mmc/host/sdhci-tegra.c +0
-1goto err_clk_get; }clk_prepare_enable (clk); --2.7.4
Kind regards
Uffe