alsa-devel.alsa-project.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/3] ASoC: fsl_asrc: Propagate the real error code
@ 2016-08-19 13:30 Fabio Estevam
  2016-08-19 13:31 ` [PATCH 2/3] ASoC: fsl_asrc: Use np variable Fabio Estevam
                   ` (2 more replies)
  0 siblings, 3 replies; 5+ messages in thread
From: Fabio Estevam @ 2016-08-19 13:30 UTC (permalink / raw)
  To: broonie; +Cc: nicoleotsuka, Fabio Estevam, alsa-devel, festevam

Instead of returning -EINVAL on error, return the real error code.

Signed-off-by: Fabio Estevam <fabio.estevam@nxp.com>
---
 sound/soc/fsl/fsl_asrc.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/sound/soc/fsl/fsl_asrc.c b/sound/soc/fsl/fsl_asrc.c
index c1a0e01..15f8ba5 100644
--- a/sound/soc/fsl/fsl_asrc.c
+++ b/sound/soc/fsl/fsl_asrc.c
@@ -892,7 +892,7 @@ static int fsl_asrc_probe(struct platform_device *pdev)
 	ret = fsl_asrc_init(asrc_priv);
 	if (ret) {
 		dev_err(&pdev->dev, "failed to init asrc %d\n", ret);
-		return -EINVAL;
+		return ret;
 	}
 
 	asrc_priv->channel_avail = 10;
@@ -901,14 +901,14 @@ static int fsl_asrc_probe(struct platform_device *pdev)
 				   &asrc_priv->asrc_rate);
 	if (ret) {
 		dev_err(&pdev->dev, "failed to get output rate\n");
-		return -EINVAL;
+		return ret;
 	}
 
 	ret = of_property_read_u32(np, "fsl,asrc-width",
 				   &asrc_priv->asrc_width);
 	if (ret) {
 		dev_err(&pdev->dev, "failed to get output width\n");
-		return -EINVAL;
+		return ret;
 	}
 
 	if (asrc_priv->asrc_width != 16 && asrc_priv->asrc_width != 24) {
-- 
1.9.1

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

* [PATCH 2/3] ASoC: fsl_asrc: Use np variable
  2016-08-19 13:30 [PATCH 1/3] ASoC: fsl_asrc: Propagate the real error code Fabio Estevam
@ 2016-08-19 13:31 ` Fabio Estevam
  2016-08-19 15:26   ` Mark Brown
  2016-08-19 13:31 ` [PATCH 3/3] ASoC: fsl_asrc: Remove unneeded driver registration message Fabio Estevam
  2016-08-19 14:19 ` [PATCH 1/3] ASoC: fsl_asrc: Propagate the real error code Mark Brown
  2 siblings, 1 reply; 5+ messages in thread
From: Fabio Estevam @ 2016-08-19 13:31 UTC (permalink / raw)
  To: broonie; +Cc: nicoleotsuka, Fabio Estevam, alsa-devel, festevam

The 'np' variable is already assigned to 'pdev->dev.of_node', so use
it to improve readability.

No functional change.

Signed-off-by: Fabio Estevam <fabio.estevam@nxp.com>
---
 sound/soc/fsl/fsl_asrc.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/sound/soc/fsl/fsl_asrc.c b/sound/soc/fsl/fsl_asrc.c
index 15f8ba5..a37339a 100644
--- a/sound/soc/fsl/fsl_asrc.c
+++ b/sound/soc/fsl/fsl_asrc.c
@@ -879,7 +879,7 @@ static int fsl_asrc_probe(struct platform_device *pdev)
 		}
 	}
 
-	if (of_device_is_compatible(pdev->dev.of_node, "fsl,imx35-asrc")) {
+	if (of_device_is_compatible(np, "fsl,imx35-asrc")) {
 		asrc_priv->channel_bits = 3;
 		clk_map[IN] = input_clk_map_imx35;
 		clk_map[OUT] = output_clk_map_imx35;
-- 
1.9.1

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

* [PATCH 3/3] ASoC: fsl_asrc: Remove unneeded driver registration message
  2016-08-19 13:30 [PATCH 1/3] ASoC: fsl_asrc: Propagate the real error code Fabio Estevam
  2016-08-19 13:31 ` [PATCH 2/3] ASoC: fsl_asrc: Use np variable Fabio Estevam
@ 2016-08-19 13:31 ` Fabio Estevam
  2016-08-19 14:19 ` [PATCH 1/3] ASoC: fsl_asrc: Propagate the real error code Mark Brown
  2 siblings, 0 replies; 5+ messages in thread
From: Fabio Estevam @ 2016-08-19 13:31 UTC (permalink / raw)
  To: broonie; +Cc: nicoleotsuka, Fabio Estevam, alsa-devel, festevam

There is no need to announce that the driver has been successfully
probed, so remove the unneeded message.

Signed-off-by: Fabio Estevam <fabio.estevam@nxp.com>
---
 sound/soc/fsl/fsl_asrc.c | 2 --
 1 file changed, 2 deletions(-)

diff --git a/sound/soc/fsl/fsl_asrc.c b/sound/soc/fsl/fsl_asrc.c
index a37339a..b7157ce 100644
--- a/sound/soc/fsl/fsl_asrc.c
+++ b/sound/soc/fsl/fsl_asrc.c
@@ -933,8 +933,6 @@ static int fsl_asrc_probe(struct platform_device *pdev)
 		return ret;
 	}
 
-	dev_info(&pdev->dev, "driver registered\n");
-
 	return 0;
 }
 
-- 
1.9.1

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

* Re: [PATCH 1/3] ASoC: fsl_asrc: Propagate the real error code
  2016-08-19 13:30 [PATCH 1/3] ASoC: fsl_asrc: Propagate the real error code Fabio Estevam
  2016-08-19 13:31 ` [PATCH 2/3] ASoC: fsl_asrc: Use np variable Fabio Estevam
  2016-08-19 13:31 ` [PATCH 3/3] ASoC: fsl_asrc: Remove unneeded driver registration message Fabio Estevam
@ 2016-08-19 14:19 ` Mark Brown
  2 siblings, 0 replies; 5+ messages in thread
From: Mark Brown @ 2016-08-19 14:19 UTC (permalink / raw)
  To: Fabio Estevam; +Cc: nicoleotsuka, alsa-devel, festevam


[-- Attachment #1.1: Type: text/plain, Size: 181 bytes --]

On Fri, Aug 19, 2016 at 10:30:59AM -0300, Fabio Estevam wrote:
> Instead of returning -EINVAL on error, return the real error code.

I seem to be missing patch 2/3 for some reason?

[-- Attachment #1.2: signature.asc --]
[-- Type: application/pgp-signature, Size: 473 bytes --]

[-- Attachment #2: Type: text/plain, Size: 0 bytes --]



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

* Re: [PATCH 2/3] ASoC: fsl_asrc: Use np variable
  2016-08-19 13:31 ` [PATCH 2/3] ASoC: fsl_asrc: Use np variable Fabio Estevam
@ 2016-08-19 15:26   ` Mark Brown
  0 siblings, 0 replies; 5+ messages in thread
From: Mark Brown @ 2016-08-19 15:26 UTC (permalink / raw)
  To: Fabio Estevam; +Cc: nicoleotsuka, alsa-devel, festevam


[-- Attachment #1.1: Type: text/plain, Size: 234 bytes --]

On Fri, Aug 19, 2016 at 10:31:00AM -0300, Fabio Estevam wrote:
> The 'np' variable is already assigned to 'pdev->dev.of_node', so use
> it to improve readability.

Oh, now this turned up - must've been caught up in a queue somewhere.

[-- Attachment #1.2: signature.asc --]
[-- Type: application/pgp-signature, Size: 473 bytes --]

[-- Attachment #2: Type: text/plain, Size: 0 bytes --]



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

end of thread, other threads:[~2016-08-19 15:26 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-08-19 13:30 [PATCH 1/3] ASoC: fsl_asrc: Propagate the real error code Fabio Estevam
2016-08-19 13:31 ` [PATCH 2/3] ASoC: fsl_asrc: Use np variable Fabio Estevam
2016-08-19 15:26   ` Mark Brown
2016-08-19 13:31 ` [PATCH 3/3] ASoC: fsl_asrc: Remove unneeded driver registration message Fabio Estevam
2016-08-19 14:19 ` [PATCH 1/3] ASoC: fsl_asrc: Propagate the real error code Mark Brown

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).