linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/5] ASoC: fsl_spdif: don't print EPROBE_DEFER as error
@ 2019-01-17  9:06 Stefan Agner
  2019-01-17  9:06 ` [PATCH 2/5] ASoC: imx-spdif: " Stefan Agner
                   ` (5 more replies)
  0 siblings, 6 replies; 16+ messages in thread
From: Stefan Agner @ 2019-01-17  9:06 UTC (permalink / raw)
  To: timur, nicoleotsuka, Xiubo.Lee
  Cc: fabio.estevam, lgirdwood, broonie, perex, tiwai, alsa-devel,
	linux-kernel, Stefan Agner

Probe deferral is to be expected during normal operation, so avoid
printing an error when it is encountered.

Signed-off-by: Stefan Agner <stefan@agner.ch>
---
 sound/soc/fsl/fsl_spdif.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/sound/soc/fsl/fsl_spdif.c b/sound/soc/fsl/fsl_spdif.c
index 740b90df44bb..a26686e7281c 100644
--- a/sound/soc/fsl/fsl_spdif.c
+++ b/sound/soc/fsl/fsl_spdif.c
@@ -1320,7 +1320,7 @@ static int fsl_spdif_probe(struct platform_device *pdev)
 	}
 
 	ret = imx_pcm_dma_init(pdev, IMX_SPDIF_DMABUF_SIZE);
-	if (ret)
+	if (ret && ret != -EPROBE_DEFER)
 		dev_err(&pdev->dev, "imx_pcm_dma_init failed: %d\n", ret);
 
 	return ret;
-- 
2.20.1


^ permalink raw reply related	[flat|nested] 16+ messages in thread

* [PATCH 2/5] ASoC: imx-spdif: don't print EPROBE_DEFER as error
  2019-01-17  9:06 [PATCH 1/5] ASoC: fsl_spdif: don't print EPROBE_DEFER as error Stefan Agner
@ 2019-01-17  9:06 ` Stefan Agner
  2019-01-17  9:59   ` [alsa-devel] " Daniel Baluta
  2019-01-17 22:00   ` Nicolin Chen
  2019-01-17  9:06 ` [PATCH 3/5] ASoC: imx-sgtl5000: " Stefan Agner
                   ` (4 subsequent siblings)
  5 siblings, 2 replies; 16+ messages in thread
From: Stefan Agner @ 2019-01-17  9:06 UTC (permalink / raw)
  To: timur, nicoleotsuka, Xiubo.Lee
  Cc: fabio.estevam, lgirdwood, broonie, perex, tiwai, alsa-devel,
	linux-kernel, Stefan Agner

Probe deferral is to be expected during normal operation, so avoid
printing an error when it is encountered.

Removing the goto would not be strictly necessary. However, if
code gets added later, the cleanup in the EPROBE_DEFER case likely
would get missed.

Signed-off-by: Stefan Agner <stefan@agner.ch>
---
 sound/soc/fsl/imx-spdif.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/sound/soc/fsl/imx-spdif.c b/sound/soc/fsl/imx-spdif.c
index fb896b2c9ba3..797d66e43d49 100644
--- a/sound/soc/fsl/imx-spdif.c
+++ b/sound/soc/fsl/imx-spdif.c
@@ -67,10 +67,8 @@ static int imx_spdif_audio_probe(struct platform_device *pdev)
 		goto end;
 
 	ret = devm_snd_soc_register_card(&pdev->dev, &data->card);
-	if (ret) {
+	if (ret && ret != -EPROBE_DEFER)
 		dev_err(&pdev->dev, "snd_soc_register_card failed: %d\n", ret);
-		goto end;
-	}
 
 end:
 	of_node_put(spdif_np);
-- 
2.20.1


^ permalink raw reply related	[flat|nested] 16+ messages in thread

* [PATCH 3/5] ASoC: imx-sgtl5000: don't print EPROBE_DEFER as error
  2019-01-17  9:06 [PATCH 1/5] ASoC: fsl_spdif: don't print EPROBE_DEFER as error Stefan Agner
  2019-01-17  9:06 ` [PATCH 2/5] ASoC: imx-spdif: " Stefan Agner
@ 2019-01-17  9:06 ` Stefan Agner
  2019-01-17 10:01   ` [alsa-devel] " Daniel Baluta
  2019-01-17 22:03   ` Nicolin Chen
  2019-01-17  9:06 ` [PATCH 4/5] ASoC: imx-sgtl5000: put of nodes if finding codec fails Stefan Agner
                   ` (3 subsequent siblings)
  5 siblings, 2 replies; 16+ messages in thread
From: Stefan Agner @ 2019-01-17  9:06 UTC (permalink / raw)
  To: timur, nicoleotsuka, Xiubo.Lee
  Cc: fabio.estevam, lgirdwood, broonie, perex, tiwai, alsa-devel,
	linux-kernel, Stefan Agner

Probe deferral is to be expected during normal operation, so avoid
printing an error when it is encountered.

Signed-off-by: Stefan Agner <stefan@agner.ch>
---
 sound/soc/fsl/imx-sgtl5000.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/sound/soc/fsl/imx-sgtl5000.c b/sound/soc/fsl/imx-sgtl5000.c
index c29200cf755a..e1e20499b2f1 100644
--- a/sound/soc/fsl/imx-sgtl5000.c
+++ b/sound/soc/fsl/imx-sgtl5000.c
@@ -156,7 +156,9 @@ static int imx_sgtl5000_probe(struct platform_device *pdev)
 
 	ret = devm_snd_soc_register_card(&pdev->dev, &data->card);
 	if (ret) {
-		dev_err(&pdev->dev, "snd_soc_register_card failed (%d)\n", ret);
+		if (ret != -EPROBE_DEFER)
+			dev_err(&pdev->dev, "snd_soc_register_card failed (%d)\n",
+				ret);
 		goto fail;
 	}
 
-- 
2.20.1


^ permalink raw reply related	[flat|nested] 16+ messages in thread

* [PATCH 4/5] ASoC: imx-sgtl5000: put of nodes if finding codec fails
  2019-01-17  9:06 [PATCH 1/5] ASoC: fsl_spdif: don't print EPROBE_DEFER as error Stefan Agner
  2019-01-17  9:06 ` [PATCH 2/5] ASoC: imx-spdif: " Stefan Agner
  2019-01-17  9:06 ` [PATCH 3/5] ASoC: imx-sgtl5000: " Stefan Agner
@ 2019-01-17  9:06 ` Stefan Agner
  2019-01-17 10:04   ` [alsa-devel] " Daniel Baluta
                     ` (2 more replies)
  2019-01-17  9:06 ` [PATCH 5/5] ASoC: imx-sgtl5000: lower log level for potential probe deferral cases Stefan Agner
                   ` (2 subsequent siblings)
  5 siblings, 3 replies; 16+ messages in thread
From: Stefan Agner @ 2019-01-17  9:06 UTC (permalink / raw)
  To: timur, nicoleotsuka, Xiubo.Lee
  Cc: fabio.estevam, lgirdwood, broonie, perex, tiwai, alsa-devel,
	linux-kernel, Stefan Agner

Make sure to properly put the of node in case finding the codec
fails.

Fixes: 81e8e4926167 ("ASoC: fsl: add sgtl5000 clock support for imx-sgtl5000")
Signed-off-by: Stefan Agner <stefan@agner.ch>
---
 sound/soc/fsl/imx-sgtl5000.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/sound/soc/fsl/imx-sgtl5000.c b/sound/soc/fsl/imx-sgtl5000.c
index e1e20499b2f1..45969e6dfad7 100644
--- a/sound/soc/fsl/imx-sgtl5000.c
+++ b/sound/soc/fsl/imx-sgtl5000.c
@@ -111,7 +111,8 @@ static int imx_sgtl5000_probe(struct platform_device *pdev)
 	codec_dev = of_find_i2c_device_by_node(codec_np);
 	if (!codec_dev) {
 		dev_err(&pdev->dev, "failed to find codec platform device\n");
-		return -EPROBE_DEFER;
+		ret = -EPROBE_DEFER;
+		goto fail;
 	}
 
 	data = devm_kzalloc(&pdev->dev, sizeof(*data), GFP_KERNEL);
-- 
2.20.1


^ permalink raw reply related	[flat|nested] 16+ messages in thread

* [PATCH 5/5] ASoC: imx-sgtl5000: lower log level for potential probe deferral cases
  2019-01-17  9:06 [PATCH 1/5] ASoC: fsl_spdif: don't print EPROBE_DEFER as error Stefan Agner
                   ` (2 preceding siblings ...)
  2019-01-17  9:06 ` [PATCH 4/5] ASoC: imx-sgtl5000: put of nodes if finding codec fails Stefan Agner
@ 2019-01-17  9:06 ` Stefan Agner
  2019-01-17 10:00   ` [alsa-devel] " Daniel Baluta
  2019-01-17 22:01   ` Nicolin Chen
  2019-01-17 10:01 ` [alsa-devel] [PATCH 1/5] ASoC: fsl_spdif: don't print EPROBE_DEFER as error Daniel Baluta
  2019-01-17 21:52 ` Nicolin Chen
  5 siblings, 2 replies; 16+ messages in thread
From: Stefan Agner @ 2019-01-17  9:06 UTC (permalink / raw)
  To: timur, nicoleotsuka, Xiubo.Lee
  Cc: fabio.estevam, lgirdwood, broonie, perex, tiwai, alsa-devel,
	linux-kernel, Stefan Agner

Not finding the codec/SSI instance can be due to probe deferral.
Do not print error messages in those cases.

Signed-off-by: Stefan Agner <stefan@agner.ch>
---
 sound/soc/fsl/imx-sgtl5000.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/sound/soc/fsl/imx-sgtl5000.c b/sound/soc/fsl/imx-sgtl5000.c
index 45969e6dfad7..b6cb80480b60 100644
--- a/sound/soc/fsl/imx-sgtl5000.c
+++ b/sound/soc/fsl/imx-sgtl5000.c
@@ -104,13 +104,13 @@ static int imx_sgtl5000_probe(struct platform_device *pdev)
 
 	ssi_pdev = of_find_device_by_node(ssi_np);
 	if (!ssi_pdev) {
-		dev_err(&pdev->dev, "failed to find SSI platform device\n");
+		dev_dbg(&pdev->dev, "failed to find SSI platform device\n");
 		ret = -EPROBE_DEFER;
 		goto fail;
 	}
 	codec_dev = of_find_i2c_device_by_node(codec_np);
 	if (!codec_dev) {
-		dev_err(&pdev->dev, "failed to find codec platform device\n");
+		dev_dbg(&pdev->dev, "failed to find codec platform device\n");
 		ret = -EPROBE_DEFER;
 		goto fail;
 	}
-- 
2.20.1


^ permalink raw reply related	[flat|nested] 16+ messages in thread

* Re: [alsa-devel] [PATCH 2/5] ASoC: imx-spdif: don't print EPROBE_DEFER as error
  2019-01-17  9:06 ` [PATCH 2/5] ASoC: imx-spdif: " Stefan Agner
@ 2019-01-17  9:59   ` Daniel Baluta
  2019-01-17 22:00   ` Nicolin Chen
  1 sibling, 0 replies; 16+ messages in thread
From: Daniel Baluta @ 2019-01-17  9:59 UTC (permalink / raw)
  To: Stefan Agner
  Cc: Timur Tabi, Nicolin Chen, Xiubo Li, Linux-ALSA,
	Linux Kernel Mailing List, Takashi Iwai, Liam Girdwood,
	Mark Brown, Fabio Estevam

On Thu, Jan 17, 2019 at 11:07 AM Stefan Agner <stefan@agner.ch> wrote:
>
> Probe deferral is to be expected during normal operation, so avoid
> printing an error when it is encountered.
>
> Removing the goto would not be strictly necessary. However, if
> code gets added later, the cleanup in the EPROBE_DEFER case likely
> would get missed.
>
> Signed-off-by: Stefan Agner <stefan@agner.ch>

Reviewed-by: Daniel Baluta <daniel.baluta@nxp.com>

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [alsa-devel] [PATCH 5/5] ASoC: imx-sgtl5000: lower log level for potential probe deferral cases
  2019-01-17  9:06 ` [PATCH 5/5] ASoC: imx-sgtl5000: lower log level for potential probe deferral cases Stefan Agner
@ 2019-01-17 10:00   ` Daniel Baluta
  2019-01-17 22:01   ` Nicolin Chen
  1 sibling, 0 replies; 16+ messages in thread
From: Daniel Baluta @ 2019-01-17 10:00 UTC (permalink / raw)
  To: Stefan Agner
  Cc: Timur Tabi, Nicolin Chen, Xiubo Li, Linux-ALSA,
	Linux Kernel Mailing List, Takashi Iwai, Liam Girdwood,
	Mark Brown, Fabio Estevam

On Thu, Jan 17, 2019 at 11:07 AM Stefan Agner <stefan@agner.ch> wrote:
>
> Not finding the codec/SSI instance can be due to probe deferral.
> Do not print error messages in those cases.
>
> Signed-off-by: Stefan Agner <stefan@agner.ch>
Reviewed-by: Daniel Baluta <daniel.baluta@nxp.com>

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [alsa-devel] [PATCH 1/5] ASoC: fsl_spdif: don't print EPROBE_DEFER as error
  2019-01-17  9:06 [PATCH 1/5] ASoC: fsl_spdif: don't print EPROBE_DEFER as error Stefan Agner
                   ` (3 preceding siblings ...)
  2019-01-17  9:06 ` [PATCH 5/5] ASoC: imx-sgtl5000: lower log level for potential probe deferral cases Stefan Agner
@ 2019-01-17 10:01 ` Daniel Baluta
  2019-01-17 21:52 ` Nicolin Chen
  5 siblings, 0 replies; 16+ messages in thread
From: Daniel Baluta @ 2019-01-17 10:01 UTC (permalink / raw)
  To: Stefan Agner
  Cc: Timur Tabi, Nicolin Chen, Xiubo Li, Linux-ALSA,
	Linux Kernel Mailing List, Takashi Iwai, Liam Girdwood,
	Mark Brown, Fabio Estevam

On Thu, Jan 17, 2019 at 11:07 AM Stefan Agner <stefan@agner.ch> wrote:
>
> Probe deferral is to be expected during normal operation, so avoid
> printing an error when it is encountered.
>
> Signed-off-by: Stefan Agner <stefan@agner.ch>

Reviewed-by: Daniel Baluta <daniel.baluta@nxp.com>

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [alsa-devel] [PATCH 3/5] ASoC: imx-sgtl5000: don't print EPROBE_DEFER as error
  2019-01-17  9:06 ` [PATCH 3/5] ASoC: imx-sgtl5000: " Stefan Agner
@ 2019-01-17 10:01   ` Daniel Baluta
  2019-01-17 22:03   ` Nicolin Chen
  1 sibling, 0 replies; 16+ messages in thread
From: Daniel Baluta @ 2019-01-17 10:01 UTC (permalink / raw)
  To: Stefan Agner
  Cc: Timur Tabi, Nicolin Chen, Xiubo Li, Linux-ALSA,
	Linux Kernel Mailing List, Takashi Iwai, Liam Girdwood,
	Mark Brown, Fabio Estevam

On Thu, Jan 17, 2019 at 11:07 AM Stefan Agner <stefan@agner.ch> wrote:
>
> Probe deferral is to be expected during normal operation, so avoid
> printing an error when it is encountered.
>
> Signed-off-by: Stefan Agner <stefan@agner.ch>

Reviewed-by: Daniel Baluta <daniel.baluta@nxp.com>

> ---
>  sound/soc/fsl/imx-sgtl5000.c | 4 +++-
>  1 file changed, 3 insertions(+), 1 deletion(-)
>
> diff --git a/sound/soc/fsl/imx-sgtl5000.c b/sound/soc/fsl/imx-sgtl5000.c
> index c29200cf755a..e1e20499b2f1 100644
> --- a/sound/soc/fsl/imx-sgtl5000.c
> +++ b/sound/soc/fsl/imx-sgtl5000.c
> @@ -156,7 +156,9 @@ static int imx_sgtl5000_probe(struct platform_device *pdev)
>
>         ret = devm_snd_soc_register_card(&pdev->dev, &data->card);
>         if (ret) {
> -               dev_err(&pdev->dev, "snd_soc_register_card failed (%d)\n", ret);
> +               if (ret != -EPROBE_DEFER)
> +                       dev_err(&pdev->dev, "snd_soc_register_card failed (%d)\n",
> +                               ret);
>                 goto fail;
>         }
>
> --
> 2.20.1
>
> _______________________________________________
> Alsa-devel mailing list
> Alsa-devel@alsa-project.org
> http://mailman.alsa-project.org/mailman/listinfo/alsa-devel

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [alsa-devel] [PATCH 4/5] ASoC: imx-sgtl5000: put of nodes if finding codec fails
  2019-01-17  9:06 ` [PATCH 4/5] ASoC: imx-sgtl5000: put of nodes if finding codec fails Stefan Agner
@ 2019-01-17 10:04   ` Daniel Baluta
  2019-01-17 12:04   ` Fabio Estevam
  2019-01-17 22:04   ` Nicolin Chen
  2 siblings, 0 replies; 16+ messages in thread
From: Daniel Baluta @ 2019-01-17 10:04 UTC (permalink / raw)
  To: Stefan Agner
  Cc: Timur Tabi, Nicolin Chen, Xiubo Li, Linux-ALSA,
	Linux Kernel Mailing List, Takashi Iwai, Liam Girdwood,
	Mark Brown, Fabio Estevam

On Thu, Jan 17, 2019 at 11:07 AM Stefan Agner <stefan@agner.ch> wrote:
>
> Make sure to properly put the of node in case finding the codec
> fails.
>
> Fixes: 81e8e4926167 ("ASoC: fsl: add sgtl5000 clock support for imx-sgtl5000")
> Signed-off-by: Stefan Agner <stefan@agner.ch>

Reviewed-by: Daniel Baluta <daniel.baluta@nxp.com>

> ---
>  sound/soc/fsl/imx-sgtl5000.c | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/sound/soc/fsl/imx-sgtl5000.c b/sound/soc/fsl/imx-sgtl5000.c
> index e1e20499b2f1..45969e6dfad7 100644
> --- a/sound/soc/fsl/imx-sgtl5000.c
> +++ b/sound/soc/fsl/imx-sgtl5000.c
> @@ -111,7 +111,8 @@ static int imx_sgtl5000_probe(struct platform_device *pdev)
>         codec_dev = of_find_i2c_device_by_node(codec_np);
>         if (!codec_dev) {
>                 dev_err(&pdev->dev, "failed to find codec platform device\n");
> -               return -EPROBE_DEFER;
> +               ret = -EPROBE_DEFER;
> +               goto fail;
>         }
>
>         data = devm_kzalloc(&pdev->dev, sizeof(*data), GFP_KERNEL);
> --
> 2.20.1
>
> _______________________________________________
> Alsa-devel mailing list
> Alsa-devel@alsa-project.org
> http://mailman.alsa-project.org/mailman/listinfo/alsa-devel

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [alsa-devel] [PATCH 4/5] ASoC: imx-sgtl5000: put of nodes if finding codec fails
  2019-01-17  9:06 ` [PATCH 4/5] ASoC: imx-sgtl5000: put of nodes if finding codec fails Stefan Agner
  2019-01-17 10:04   ` [alsa-devel] " Daniel Baluta
@ 2019-01-17 12:04   ` Fabio Estevam
  2019-01-17 22:04   ` Nicolin Chen
  2 siblings, 0 replies; 16+ messages in thread
From: Fabio Estevam @ 2019-01-17 12:04 UTC (permalink / raw)
  To: Stefan Agner
  Cc: timur, Nicolin Chen, Xiubo Li, Linux-ALSA, linux-kernel,
	Takashi Iwai, Liam Girdwood, Mark Brown, Fabio Estevam

Hi Stefan,

On Thu, Jan 17, 2019 at 7:07 AM Stefan Agner <stefan@agner.ch> wrote:
>
> Make sure to properly put the of node in case finding the codec
> fails.
>
> Fixes: 81e8e4926167 ("ASoC: fsl: add sgtl5000 clock support for imx-sgtl5000")
> Signed-off-by: Stefan Agner <stefan@agner.ch>

Looks good.

I would suggest making this patch the first one of the series, since
it is a bug fix and could potentially be applied to stable.

Thanks

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [PATCH 1/5] ASoC: fsl_spdif: don't print EPROBE_DEFER as error
  2019-01-17  9:06 [PATCH 1/5] ASoC: fsl_spdif: don't print EPROBE_DEFER as error Stefan Agner
                   ` (4 preceding siblings ...)
  2019-01-17 10:01 ` [alsa-devel] [PATCH 1/5] ASoC: fsl_spdif: don't print EPROBE_DEFER as error Daniel Baluta
@ 2019-01-17 21:52 ` Nicolin Chen
  5 siblings, 0 replies; 16+ messages in thread
From: Nicolin Chen @ 2019-01-17 21:52 UTC (permalink / raw)
  To: Stefan Agner
  Cc: timur, Xiubo.Lee, fabio.estevam, lgirdwood, broonie, perex,
	tiwai, alsa-devel, linux-kernel

On Thu, Jan 17, 2019 at 10:06:36AM +0100, Stefan Agner wrote:
> Probe deferral is to be expected during normal operation, so avoid
> printing an error when it is encountered.
> 
> Signed-off-by: Stefan Agner <stefan@agner.ch>

Acked-by: Nicolin Chen <nicoleotsuka@gmail.com>

> ---
>  sound/soc/fsl/fsl_spdif.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/sound/soc/fsl/fsl_spdif.c b/sound/soc/fsl/fsl_spdif.c
> index 740b90df44bb..a26686e7281c 100644
> --- a/sound/soc/fsl/fsl_spdif.c
> +++ b/sound/soc/fsl/fsl_spdif.c
> @@ -1320,7 +1320,7 @@ static int fsl_spdif_probe(struct platform_device *pdev)
>  	}
>  
>  	ret = imx_pcm_dma_init(pdev, IMX_SPDIF_DMABUF_SIZE);
> -	if (ret)
> +	if (ret && ret != -EPROBE_DEFER)
>  		dev_err(&pdev->dev, "imx_pcm_dma_init failed: %d\n", ret);
>  
>  	return ret;
> -- 
> 2.20.1
> 

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [PATCH 2/5] ASoC: imx-spdif: don't print EPROBE_DEFER as error
  2019-01-17  9:06 ` [PATCH 2/5] ASoC: imx-spdif: " Stefan Agner
  2019-01-17  9:59   ` [alsa-devel] " Daniel Baluta
@ 2019-01-17 22:00   ` Nicolin Chen
  1 sibling, 0 replies; 16+ messages in thread
From: Nicolin Chen @ 2019-01-17 22:00 UTC (permalink / raw)
  To: Stefan Agner
  Cc: timur, Xiubo.Lee, fabio.estevam, lgirdwood, broonie, perex,
	tiwai, alsa-devel, linux-kernel

On Thu, Jan 17, 2019 at 10:06:37AM +0100, Stefan Agner wrote:

> Removing the goto would not be strictly necessary. However, if
> code gets added later, the cleanup in the EPROBE_DEFER case likely
> would get missed.

Considering there is no code being added between them over the
years, I am okay to remove it since it makes things clean. But
as you mentioned, we gotta be careful if code gets added later.

> Signed-off-by: Stefan Agner <stefan@agner.ch>

Acked-by: Nicolin Chen <nicoleotsuka@gmail.com>

> ---
>  sound/soc/fsl/imx-spdif.c | 4 +---
>  1 file changed, 1 insertion(+), 3 deletions(-)
> 
> diff --git a/sound/soc/fsl/imx-spdif.c b/sound/soc/fsl/imx-spdif.c
> index fb896b2c9ba3..797d66e43d49 100644
> --- a/sound/soc/fsl/imx-spdif.c
> +++ b/sound/soc/fsl/imx-spdif.c
> @@ -67,10 +67,8 @@ static int imx_spdif_audio_probe(struct platform_device *pdev)
>  		goto end;
>  
>  	ret = devm_snd_soc_register_card(&pdev->dev, &data->card);
> -	if (ret) {
> +	if (ret && ret != -EPROBE_DEFER)
>  		dev_err(&pdev->dev, "snd_soc_register_card failed: %d\n", ret);
> -		goto end;
> -	}
>  
>  end:
>  	of_node_put(spdif_np);
> -- 
> 2.20.1
> 

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [PATCH 5/5] ASoC: imx-sgtl5000: lower log level for potential probe deferral cases
  2019-01-17  9:06 ` [PATCH 5/5] ASoC: imx-sgtl5000: lower log level for potential probe deferral cases Stefan Agner
  2019-01-17 10:00   ` [alsa-devel] " Daniel Baluta
@ 2019-01-17 22:01   ` Nicolin Chen
  1 sibling, 0 replies; 16+ messages in thread
From: Nicolin Chen @ 2019-01-17 22:01 UTC (permalink / raw)
  To: Stefan Agner
  Cc: timur, Xiubo.Lee, fabio.estevam, lgirdwood, broonie, perex,
	tiwai, alsa-devel, linux-kernel

On Thu, Jan 17, 2019 at 10:06:40AM +0100, Stefan Agner wrote:
> Not finding the codec/SSI instance can be due to probe deferral.
> Do not print error messages in those cases.
> 
> Signed-off-by: Stefan Agner <stefan@agner.ch>

Acked-by: Nicolin Chen <nicoleotsuka@gmail.com>

> ---
>  sound/soc/fsl/imx-sgtl5000.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/sound/soc/fsl/imx-sgtl5000.c b/sound/soc/fsl/imx-sgtl5000.c
> index 45969e6dfad7..b6cb80480b60 100644
> --- a/sound/soc/fsl/imx-sgtl5000.c
> +++ b/sound/soc/fsl/imx-sgtl5000.c
> @@ -104,13 +104,13 @@ static int imx_sgtl5000_probe(struct platform_device *pdev)
>  
>  	ssi_pdev = of_find_device_by_node(ssi_np);
>  	if (!ssi_pdev) {
> -		dev_err(&pdev->dev, "failed to find SSI platform device\n");
> +		dev_dbg(&pdev->dev, "failed to find SSI platform device\n");
>  		ret = -EPROBE_DEFER;
>  		goto fail;
>  	}
>  	codec_dev = of_find_i2c_device_by_node(codec_np);
>  	if (!codec_dev) {
> -		dev_err(&pdev->dev, "failed to find codec platform device\n");
> +		dev_dbg(&pdev->dev, "failed to find codec platform device\n");
>  		ret = -EPROBE_DEFER;
>  		goto fail;
>  	}
> -- 
> 2.20.1
> 

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [PATCH 3/5] ASoC: imx-sgtl5000: don't print EPROBE_DEFER as error
  2019-01-17  9:06 ` [PATCH 3/5] ASoC: imx-sgtl5000: " Stefan Agner
  2019-01-17 10:01   ` [alsa-devel] " Daniel Baluta
@ 2019-01-17 22:03   ` Nicolin Chen
  1 sibling, 0 replies; 16+ messages in thread
From: Nicolin Chen @ 2019-01-17 22:03 UTC (permalink / raw)
  To: Stefan Agner
  Cc: timur, Xiubo.Lee, fabio.estevam, lgirdwood, broonie, perex,
	tiwai, alsa-devel, linux-kernel

On Thu, Jan 17, 2019 at 10:06:38AM +0100, Stefan Agner wrote:
> Probe deferral is to be expected during normal operation, so avoid
> printing an error when it is encountered.
> 
> Signed-off-by: Stefan Agner <stefan@agner.ch>

Acked-by: Nicolin Chen <nicoleotsuka@gmail.com>

> ---
>  sound/soc/fsl/imx-sgtl5000.c | 4 +++-
>  1 file changed, 3 insertions(+), 1 deletion(-)
> 
> diff --git a/sound/soc/fsl/imx-sgtl5000.c b/sound/soc/fsl/imx-sgtl5000.c
> index c29200cf755a..e1e20499b2f1 100644
> --- a/sound/soc/fsl/imx-sgtl5000.c
> +++ b/sound/soc/fsl/imx-sgtl5000.c
> @@ -156,7 +156,9 @@ static int imx_sgtl5000_probe(struct platform_device *pdev)
>  
>  	ret = devm_snd_soc_register_card(&pdev->dev, &data->card);
>  	if (ret) {
> -		dev_err(&pdev->dev, "snd_soc_register_card failed (%d)\n", ret);
> +		if (ret != -EPROBE_DEFER)
> +			dev_err(&pdev->dev, "snd_soc_register_card failed (%d)\n",
> +				ret);
>  		goto fail;
>  	}
>  
> -- 
> 2.20.1
> 

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [PATCH 4/5] ASoC: imx-sgtl5000: put of nodes if finding codec fails
  2019-01-17  9:06 ` [PATCH 4/5] ASoC: imx-sgtl5000: put of nodes if finding codec fails Stefan Agner
  2019-01-17 10:04   ` [alsa-devel] " Daniel Baluta
  2019-01-17 12:04   ` Fabio Estevam
@ 2019-01-17 22:04   ` Nicolin Chen
  2 siblings, 0 replies; 16+ messages in thread
From: Nicolin Chen @ 2019-01-17 22:04 UTC (permalink / raw)
  To: Stefan Agner
  Cc: timur, Xiubo.Lee, fabio.estevam, lgirdwood, broonie, perex,
	tiwai, alsa-devel, linux-kernel

On Thu, Jan 17, 2019 at 10:06:39AM +0100, Stefan Agner wrote:
> Make sure to properly put the of node in case finding the codec
> fails.
> 
> Fixes: 81e8e4926167 ("ASoC: fsl: add sgtl5000 clock support for imx-sgtl5000")
> Signed-off-by: Stefan Agner <stefan@agner.ch>

Acked-by: Nicolin Chen <nicoleotsuka@gmail.com>

> ---
>  sound/soc/fsl/imx-sgtl5000.c | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/sound/soc/fsl/imx-sgtl5000.c b/sound/soc/fsl/imx-sgtl5000.c
> index e1e20499b2f1..45969e6dfad7 100644
> --- a/sound/soc/fsl/imx-sgtl5000.c
> +++ b/sound/soc/fsl/imx-sgtl5000.c
> @@ -111,7 +111,8 @@ static int imx_sgtl5000_probe(struct platform_device *pdev)
>  	codec_dev = of_find_i2c_device_by_node(codec_np);
>  	if (!codec_dev) {
>  		dev_err(&pdev->dev, "failed to find codec platform device\n");
> -		return -EPROBE_DEFER;
> +		ret = -EPROBE_DEFER;
> +		goto fail;
>  	}
>  
>  	data = devm_kzalloc(&pdev->dev, sizeof(*data), GFP_KERNEL);
> -- 
> 2.20.1
> 

^ permalink raw reply	[flat|nested] 16+ messages in thread

end of thread, other threads:[~2019-01-17 22:04 UTC | newest]

Thread overview: 16+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-01-17  9:06 [PATCH 1/5] ASoC: fsl_spdif: don't print EPROBE_DEFER as error Stefan Agner
2019-01-17  9:06 ` [PATCH 2/5] ASoC: imx-spdif: " Stefan Agner
2019-01-17  9:59   ` [alsa-devel] " Daniel Baluta
2019-01-17 22:00   ` Nicolin Chen
2019-01-17  9:06 ` [PATCH 3/5] ASoC: imx-sgtl5000: " Stefan Agner
2019-01-17 10:01   ` [alsa-devel] " Daniel Baluta
2019-01-17 22:03   ` Nicolin Chen
2019-01-17  9:06 ` [PATCH 4/5] ASoC: imx-sgtl5000: put of nodes if finding codec fails Stefan Agner
2019-01-17 10:04   ` [alsa-devel] " Daniel Baluta
2019-01-17 12:04   ` Fabio Estevam
2019-01-17 22:04   ` Nicolin Chen
2019-01-17  9:06 ` [PATCH 5/5] ASoC: imx-sgtl5000: lower log level for potential probe deferral cases Stefan Agner
2019-01-17 10:00   ` [alsa-devel] " Daniel Baluta
2019-01-17 22:01   ` Nicolin Chen
2019-01-17 10:01 ` [alsa-devel] [PATCH 1/5] ASoC: fsl_spdif: don't print EPROBE_DEFER as error Daniel Baluta
2019-01-17 21:52 ` Nicolin Chen

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).