diff mbox series

sdhci: tegra: Do not log error message on deferred probe

Message ID 20190604153446.22857-1-thierry.reding@gmail.com
State Deferred
Headers show
Series sdhci: tegra: Do not log error message on deferred probe | expand

Commit Message

Thierry Reding June 4, 2019, 3:34 p.m. UTC
From: Thierry Reding <treding@nvidia.com>

Recent changes have made it much more probably that clocks are not
available yet when the SDHCI driver is first probed. However, that
is a situation that the driver can cope with just fine.

To avoid confusion, don't output an error when this happens.

Signed-off-by: Thierry Reding <treding@nvidia.com>
---
 drivers/mmc/host/sdhci-tegra.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

Comments

Thierry Reding June 4, 2019, 3:38 p.m. UTC | #1
On Tue, Jun 04, 2019 at 05:34:46PM +0200, Thierry Reding wrote:
> From: Thierry Reding <treding@nvidia.com>
> 
> Recent changes have made it much more probably that clocks are not

Ugh... s/probably/probable/. Adrian, Ulf, do you want me to resend just
for that if there are no further comments, or could you ammend that when
applying?

Thierry

> available yet when the SDHCI driver is first probed. However, that
> is a situation that the driver can cope with just fine.
> 
> To avoid confusion, don't output an error when this happens.
> 
> Signed-off-by: Thierry Reding <treding@nvidia.com>
> ---
>  drivers/mmc/host/sdhci-tegra.c | 5 ++++-
>  1 file changed, 4 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/mmc/host/sdhci-tegra.c b/drivers/mmc/host/sdhci-tegra.c
> index 10d7aaf68bab..8a6a51bc038b 100644
> --- a/drivers/mmc/host/sdhci-tegra.c
> +++ b/drivers/mmc/host/sdhci-tegra.c
> @@ -1550,8 +1550,11 @@ 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 clock: %d\n", rc);
> +
>  		goto err_clk_get;
>  	}
>  	clk_prepare_enable(clk);
> -- 
> 2.21.0
>
Adrian Hunter June 5, 2019, 5:50 a.m. UTC | #2
On 4/06/19 6:34 PM, Thierry Reding wrote:
> From: Thierry Reding <treding@nvidia.com>
> 
> Recent changes have made it much more probably that clocks are not
> available yet when the SDHCI driver is first probed. However, that
> is a situation that the driver can cope with just fine.
> 
> To avoid confusion, don't output an error when this happens.
> 
> Signed-off-by: Thierry Reding <treding@nvidia.com>

Acked-by: Adrian Hunter <adrian.hunter@intel.com>

> ---
>  drivers/mmc/host/sdhci-tegra.c | 5 ++++-
>  1 file changed, 4 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/mmc/host/sdhci-tegra.c b/drivers/mmc/host/sdhci-tegra.c
> index 10d7aaf68bab..8a6a51bc038b 100644
> --- a/drivers/mmc/host/sdhci-tegra.c
> +++ b/drivers/mmc/host/sdhci-tegra.c
> @@ -1550,8 +1550,11 @@ 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 clock: %d\n", rc);
> +
>  		goto err_clk_get;
>  	}
>  	clk_prepare_enable(clk);
>
Ulf Hansson June 7, 2019, 11:02 a.m. UTC | #3
On Tue, 4 Jun 2019 at 17:38, Thierry Reding <thierry.reding@gmail.com> wrote:
>
> On Tue, Jun 04, 2019 at 05:34:46PM +0200, Thierry Reding wrote:
> > From: Thierry Reding <treding@nvidia.com>
> >
> > Recent changes have made it much more probably that clocks are not
>
> Ugh... s/probably/probable/. Adrian, Ulf, do you want me to resend just
> for that if there are no further comments, or could you ammend that when
> applying?

No worries, I amended the changelog.

>
> Thierry
>
> > available yet when the SDHCI driver is first probed. However, that
> > is a situation that the driver can cope with just fine.
> >
> > To avoid confusion, don't output an error when this happens.
> >
> > Signed-off-by: Thierry Reding <treding@nvidia.com>

Applied for next, thanks!

Kind regards
Uffe


> > ---
> >  drivers/mmc/host/sdhci-tegra.c | 5 ++++-
> >  1 file changed, 4 insertions(+), 1 deletion(-)
> >
> > diff --git a/drivers/mmc/host/sdhci-tegra.c b/drivers/mmc/host/sdhci-tegra.c
> > index 10d7aaf68bab..8a6a51bc038b 100644
> > --- a/drivers/mmc/host/sdhci-tegra.c
> > +++ b/drivers/mmc/host/sdhci-tegra.c
> > @@ -1550,8 +1550,11 @@ 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 clock: %d\n", rc);
> > +
> >               goto err_clk_get;
> >       }
> >       clk_prepare_enable(clk);
> > --
> > 2.21.0
> >
diff mbox series

Patch

diff --git a/drivers/mmc/host/sdhci-tegra.c b/drivers/mmc/host/sdhci-tegra.c
index 10d7aaf68bab..8a6a51bc038b 100644
--- a/drivers/mmc/host/sdhci-tegra.c
+++ b/drivers/mmc/host/sdhci-tegra.c
@@ -1550,8 +1550,11 @@  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 clock: %d\n", rc);
+
 		goto err_clk_get;
 	}
 	clk_prepare_enable(clk);