All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/2] ASoC: cs35l33: Fix testing return value of devm_gpiod_get_optional
@ 2016-06-30  0:13 Axel Lin
  2016-06-30  0:14 ` [PATCH 2/2] ASoC: cs35l33: Fix display revision id Axel Lin
                   ` (2 more replies)
  0 siblings, 3 replies; 6+ messages in thread
From: Axel Lin @ 2016-06-30  0:13 UTC (permalink / raw)
  To: Mark Brown; +Cc: Brian Austin, alsa-devel, Liam Girdwood, Paul Handrigan

devm_gpiod_get_optional() returns NULL when the gpio is not assigned.
So the if (PTR_ERR(cs35l33->reset_gpio) == -ENOENT) test is always false.

Signed-off-by: Axel Lin <axel.lin@ingics.com>
---
 sound/soc/codecs/cs35l33.c | 6 +-----
 1 file changed, 1 insertion(+), 5 deletions(-)

diff --git a/sound/soc/codecs/cs35l33.c b/sound/soc/codecs/cs35l33.c
index 622a111..aa5c0c5 100644
--- a/sound/soc/codecs/cs35l33.c
+++ b/sound/soc/codecs/cs35l33.c
@@ -1176,11 +1176,7 @@ static int cs35l33_i2c_probe(struct i2c_client *i2c_client,
 	/* We could issue !RST or skip it based on AMP topology */
 	cs35l33->reset_gpio = devm_gpiod_get_optional(&i2c_client->dev,
 			"reset-gpios", GPIOD_OUT_HIGH);
-
-	if (PTR_ERR(cs35l33->reset_gpio) == -ENOENT) {
-		dev_warn(&i2c_client->dev,
-			"%s WARNING: No reset gpio assigned\n", __func__);
-	} else if (IS_ERR(cs35l33->reset_gpio)) {
+	if (IS_ERR(cs35l33->reset_gpio)) {
 		dev_err(&i2c_client->dev, "%s ERROR: Can't get reset GPIO\n",
 			__func__);
 		return PTR_ERR(cs35l33->reset_gpio);
-- 
2.5.0

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

* [PATCH 2/2] ASoC: cs35l33: Fix display revision id
  2016-06-30  0:13 [PATCH 1/2] ASoC: cs35l33: Fix testing return value of devm_gpiod_get_optional Axel Lin
@ 2016-06-30  0:14 ` Axel Lin
  2016-06-30 15:36   ` Handrigan, Paul
  2016-07-01  9:54   ` Applied "ASoC: cs35l33: Fix display revision id" to the asoc tree Mark Brown
  2016-06-30 15:36 ` [PATCH 1/2] ASoC: cs35l33: Fix testing return value of devm_gpiod_get_optional Handrigan, Paul
  2016-07-01  9:54 ` Applied "ASoC: cs35l33: Fix testing return value of devm_gpiod_get_optional" to the asoc tree Mark Brown
  2 siblings, 2 replies; 6+ messages in thread
From: Axel Lin @ 2016-06-30  0:14 UTC (permalink / raw)
  To: Mark Brown; +Cc: Brian Austin, alsa-devel, Liam Girdwood, Paul Handrigan

Signed-off-by: Axel Lin <axel.lin@ingics.com>
---
 sound/soc/codecs/cs35l33.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/sound/soc/codecs/cs35l33.c b/sound/soc/codecs/cs35l33.c
index aa5c0c5..640fe24 100644
--- a/sound/soc/codecs/cs35l33.c
+++ b/sound/soc/codecs/cs35l33.c
@@ -1219,7 +1219,7 @@ static int cs35l33_i2c_probe(struct i2c_client *i2c_client,
 	}
 
 	dev_info(&i2c_client->dev,
-		 "Cirrus Logic CS35L33, Revision: %02X\n", ret & 0xFF);
+		 "Cirrus Logic CS35L33, Revision: %02X\n", reg & 0xFF);
 
 	ret = regmap_register_patch(cs35l33->regmap,
 			cs35l33_patch, ARRAY_SIZE(cs35l33_patch));
-- 
2.5.0

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

* Re: [PATCH 1/2] ASoC: cs35l33: Fix testing return value of devm_gpiod_get_optional
  2016-06-30  0:13 [PATCH 1/2] ASoC: cs35l33: Fix testing return value of devm_gpiod_get_optional Axel Lin
  2016-06-30  0:14 ` [PATCH 2/2] ASoC: cs35l33: Fix display revision id Axel Lin
@ 2016-06-30 15:36 ` Handrigan, Paul
  2016-07-01  9:54 ` Applied "ASoC: cs35l33: Fix testing return value of devm_gpiod_get_optional" to the asoc tree Mark Brown
  2 siblings, 0 replies; 6+ messages in thread
From: Handrigan, Paul @ 2016-06-30 15:36 UTC (permalink / raw)
  To: Axel Lin, Mark Brown; +Cc: Austin, Brian, Liam Girdwood, alsa-devel



On 6/29/16, 7:13 PM, "Axel Lin" <axel.lin@ingics.com> wrote:

>devm_gpiod_get_optional() returns NULL when the gpio is not assigned.
>So the if (PTR_ERR(cs35l33->reset_gpio) == -ENOENT) test is always false.
>
>Signed-off-by: Axel Lin <axel.lin@ingics.com>
>---
> sound/soc/codecs/cs35l33.c | 6 +-----
> 1 file changed, 1 insertion(+), 5 deletions(-)
>
>diff --git a/sound/soc/codecs/cs35l33.c b/sound/soc/codecs/cs35l33.c
>index 622a111..aa5c0c5 100644
>--- a/sound/soc/codecs/cs35l33.c
>+++ b/sound/soc/codecs/cs35l33.c
>@@ -1176,11 +1176,7 @@ static int cs35l33_i2c_probe(struct i2c_client
>*i2c_client,
> 	/* We could issue !RST or skip it based on AMP topology */
> 	cs35l33->reset_gpio = devm_gpiod_get_optional(&i2c_client->dev,
> 			"reset-gpios", GPIOD_OUT_HIGH);
>-
>-	if (PTR_ERR(cs35l33->reset_gpio) == -ENOENT) {
>-		dev_warn(&i2c_client->dev,
>-			"%s WARNING: No reset gpio assigned\n", __func__);
>-	} else if (IS_ERR(cs35l33->reset_gpio)) {
>+	if (IS_ERR(cs35l33->reset_gpio)) {
> 		dev_err(&i2c_client->dev, "%s ERROR: Can't get reset GPIO\n",
> 			__func__);
> 		return PTR_ERR(cs35l33->reset_gpio)
Acked-by: Paul Handrigan <Paul.Handrigan@cirrus.com>

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

* Re: [PATCH 2/2] ASoC: cs35l33: Fix display revision id
  2016-06-30  0:14 ` [PATCH 2/2] ASoC: cs35l33: Fix display revision id Axel Lin
@ 2016-06-30 15:36   ` Handrigan, Paul
  2016-07-01  9:54   ` Applied "ASoC: cs35l33: Fix display revision id" to the asoc tree Mark Brown
  1 sibling, 0 replies; 6+ messages in thread
From: Handrigan, Paul @ 2016-06-30 15:36 UTC (permalink / raw)
  To: Axel Lin, Mark Brown; +Cc: Austin, Brian, Liam Girdwood, alsa-devel



On 6/29/16, 7:14 PM, "Axel Lin" <axel.lin@ingics.com> wrote:

>Signed-off-by: Axel Lin <axel.lin@ingics.com>
>---
> sound/soc/codecs/cs35l33.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
>diff --git a/sound/soc/codecs/cs35l33.c b/sound/soc/codecs/cs35l33.c
>index aa5c0c5..640fe24 100644
>--- a/sound/soc/codecs/cs35l33.c
>+++ b/sound/soc/codecs/cs35l33.c
>@@ -1219,7 +1219,7 @@ static int cs35l33_i2c_probe(struct i2c_client
>*i2c_client,
> 	}
> 
> 	dev_info(&i2c_client->dev,
>-		 "Cirrus Logic CS35L33, Revision: %02X\n", ret & 0xFF);
>+		 "Cirrus Logic CS35L33, Revision: %02X\n", reg & 0xFF);
> 
> 	ret = regmap_register_patch(cs35l33->regmap,
> 			cs35l33_patch, ARRAY_SIZE(cs35l33_patch));
Acked-by: Paul Handrigan <Paul.Handrigan@cirrus.com>

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

* Applied "ASoC: cs35l33: Fix display revision id" to the asoc tree
  2016-06-30  0:14 ` [PATCH 2/2] ASoC: cs35l33: Fix display revision id Axel Lin
  2016-06-30 15:36   ` Handrigan, Paul
@ 2016-07-01  9:54   ` Mark Brown
  1 sibling, 0 replies; 6+ messages in thread
From: Mark Brown @ 2016-07-01  9:54 UTC (permalink / raw)
  To: Axel Lin
  Cc: Brian Austin, Mark Brown, alsa-devel, Paul Handrigan, Liam Girdwood

The patch

   ASoC: cs35l33: Fix display revision id

has been applied to the asoc tree at

   git://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git 

All being well this means that it will be integrated into the linux-next
tree (usually sometime in the next 24 hours) and sent to Linus during
the next merge window (or sooner if it is a bug fix), however if
problems are discovered then the patch may be dropped or reverted.  

You may get further e-mails resulting from automated or manual testing
and review of the tree, please engage with people reporting problems and
send followup patches addressing any issues that are reported if needed.

If any updates are required or you are submitting further changes they
should be sent as incremental updates against current git, existing
patches will not be replaced.

Please add any relevant lists and maintainers to the CCs when replying
to this mail.

Thanks,
Mark

>From 5d78b027c0d22589d535b3657700e7ff6499d3ed Mon Sep 17 00:00:00 2001
From: Axel Lin <axel.lin@ingics.com>
Date: Thu, 30 Jun 2016 08:14:30 +0800
Subject: [PATCH] ASoC: cs35l33: Fix display revision id

Signed-off-by: Axel Lin <axel.lin@ingics.com>
Acked-by: Paul Handrigan <Paul.Handrigan@cirrus.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
---
 sound/soc/codecs/cs35l33.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/sound/soc/codecs/cs35l33.c b/sound/soc/codecs/cs35l33.c
index 689c3598bf3d..a4cbb16d68ad 100644
--- a/sound/soc/codecs/cs35l33.c
+++ b/sound/soc/codecs/cs35l33.c
@@ -1219,7 +1219,7 @@ static int cs35l33_i2c_probe(struct i2c_client *i2c_client,
 	}
 
 	dev_info(&i2c_client->dev,
-		 "Cirrus Logic CS35L33, Revision: %02X\n", ret & 0xFF);
+		 "Cirrus Logic CS35L33, Revision: %02X\n", reg & 0xFF);
 
 	ret = regmap_register_patch(cs35l33->regmap,
 			cs35l33_patch, ARRAY_SIZE(cs35l33_patch));
-- 
2.8.1

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

* Applied "ASoC: cs35l33: Fix testing return value of devm_gpiod_get_optional" to the asoc tree
  2016-06-30  0:13 [PATCH 1/2] ASoC: cs35l33: Fix testing return value of devm_gpiod_get_optional Axel Lin
  2016-06-30  0:14 ` [PATCH 2/2] ASoC: cs35l33: Fix display revision id Axel Lin
  2016-06-30 15:36 ` [PATCH 1/2] ASoC: cs35l33: Fix testing return value of devm_gpiod_get_optional Handrigan, Paul
@ 2016-07-01  9:54 ` Mark Brown
  2 siblings, 0 replies; 6+ messages in thread
From: Mark Brown @ 2016-07-01  9:54 UTC (permalink / raw)
  To: Axel Lin
  Cc: Brian Austin, Mark Brown, alsa-devel, Paul Handrigan, Liam Girdwood

The patch

   ASoC: cs35l33: Fix testing return value of devm_gpiod_get_optional

has been applied to the asoc tree at

   git://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git 

All being well this means that it will be integrated into the linux-next
tree (usually sometime in the next 24 hours) and sent to Linus during
the next merge window (or sooner if it is a bug fix), however if
problems are discovered then the patch may be dropped or reverted.  

You may get further e-mails resulting from automated or manual testing
and review of the tree, please engage with people reporting problems and
send followup patches addressing any issues that are reported if needed.

If any updates are required or you are submitting further changes they
should be sent as incremental updates against current git, existing
patches will not be replaced.

Please add any relevant lists and maintainers to the CCs when replying
to this mail.

Thanks,
Mark

>From 410fe39c6d2116aa5584083cbcbb7b3796e09f5d Mon Sep 17 00:00:00 2001
From: Axel Lin <axel.lin@ingics.com>
Date: Thu, 30 Jun 2016 08:13:34 +0800
Subject: [PATCH] ASoC: cs35l33: Fix testing return value of
 devm_gpiod_get_optional

devm_gpiod_get_optional() returns NULL when the gpio is not assigned.
So the if (PTR_ERR(cs35l33->reset_gpio) == -ENOENT) test is always false.

Signed-off-by: Axel Lin <axel.lin@ingics.com>
Acked-by: Paul Handrigan <Paul.Handrigan@cirrus.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
---
 sound/soc/codecs/cs35l33.c | 6 +-----
 1 file changed, 1 insertion(+), 5 deletions(-)

diff --git a/sound/soc/codecs/cs35l33.c b/sound/soc/codecs/cs35l33.c
index d8b5fc3fc45d..689c3598bf3d 100644
--- a/sound/soc/codecs/cs35l33.c
+++ b/sound/soc/codecs/cs35l33.c
@@ -1176,11 +1176,7 @@ static int cs35l33_i2c_probe(struct i2c_client *i2c_client,
 	/* We could issue !RST or skip it based on AMP topology */
 	cs35l33->reset_gpio = devm_gpiod_get_optional(&i2c_client->dev,
 			"reset-gpios", GPIOD_OUT_HIGH);
-
-	if (PTR_ERR(cs35l33->reset_gpio) == -ENOENT) {
-		dev_warn(&i2c_client->dev,
-			"%s WARNING: No reset gpio assigned\n", __func__);
-	} else if (IS_ERR(cs35l33->reset_gpio)) {
+	if (IS_ERR(cs35l33->reset_gpio)) {
 		dev_err(&i2c_client->dev, "%s ERROR: Can't get reset GPIO\n",
 			__func__);
 		return PTR_ERR(cs35l33->reset_gpio);
-- 
2.8.1

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

end of thread, other threads:[~2016-07-01  9:54 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-06-30  0:13 [PATCH 1/2] ASoC: cs35l33: Fix testing return value of devm_gpiod_get_optional Axel Lin
2016-06-30  0:14 ` [PATCH 2/2] ASoC: cs35l33: Fix display revision id Axel Lin
2016-06-30 15:36   ` Handrigan, Paul
2016-07-01  9:54   ` Applied "ASoC: cs35l33: Fix display revision id" to the asoc tree Mark Brown
2016-06-30 15:36 ` [PATCH 1/2] ASoC: cs35l33: Fix testing return value of devm_gpiod_get_optional Handrigan, Paul
2016-07-01  9:54 ` Applied "ASoC: cs35l33: Fix testing return value of devm_gpiod_get_optional" to the asoc tree Mark Brown

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.