public inbox for alsa-devel@alsa-project.org
 help / color / mirror / Atom feed
* [PATCH 1/2] ASoC: cs42l52: Convert to use devm_gpio_request_one
@ 2014-04-08 14:10 Axel Lin
  2014-04-08 14:11 ` [PATCH 2/2] ASoC: cs42l73: " Axel Lin
  2014-04-18 14:14 ` [PATCH 1/2] ASoC: cs42l52: " Mark Brown
  0 siblings, 2 replies; 4+ messages in thread
From: Axel Lin @ 2014-04-08 14:10 UTC (permalink / raw)
  To: Mark Brown; +Cc: Brian Austin, alsa-devel, Liam Girdwood, Paul Handrigan

Current code missed a gpio_free() call in cs42l52_i2c_remove().
Convert to use devm_gpio_request_one() to fix it.

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

diff --git a/sound/soc/codecs/cs42l52.c b/sound/soc/codecs/cs42l52.c
index 460d355..2213a03 100644
--- a/sound/soc/codecs/cs42l52.c
+++ b/sound/soc/codecs/cs42l52.c
@@ -1229,8 +1229,10 @@ static int cs42l52_i2c_probe(struct i2c_client *i2c_client,
 	}
 
 	if (cs42l52->pdata.reset_gpio) {
-		ret = gpio_request_one(cs42l52->pdata.reset_gpio,
-				       GPIOF_OUT_INIT_HIGH, "CS42L52 /RST");
+		ret = devm_gpio_request_one(&i2c_client->dev,
+					    cs42l52->pdata.reset_gpio,
+					    GPIOF_OUT_INIT_HIGH,
+					    "CS42L52 /RST");
 		if (ret < 0) {
 			dev_err(&i2c_client->dev, "Failed to request /RST %d: %d\n",
 				cs42l52->pdata.reset_gpio, ret);
-- 
1.8.3.2

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

* [PATCH 2/2] ASoC: cs42l73: Convert to use devm_gpio_request_one
  2014-04-08 14:10 [PATCH 1/2] ASoC: cs42l52: Convert to use devm_gpio_request_one Axel Lin
@ 2014-04-08 14:11 ` Axel Lin
  2014-04-18 14:38   ` Mark Brown
  2014-04-18 14:14 ` [PATCH 1/2] ASoC: cs42l52: " Mark Brown
  1 sibling, 1 reply; 4+ messages in thread
From: Axel Lin @ 2014-04-08 14:11 UTC (permalink / raw)
  To: Mark Brown; +Cc: Brian Austin, alsa-devel, Liam Girdwood, Paul Handrigan

Current code missed a gpio_free() call in cs42l73_i2c_remove().
Convert to use devm_gpio_request_one() to fix it.

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

diff --git a/sound/soc/codecs/cs42l73.c b/sound/soc/codecs/cs42l73.c
index 0ee60a1..ae37179 100644
--- a/sound/soc/codecs/cs42l73.c
+++ b/sound/soc/codecs/cs42l73.c
@@ -1443,8 +1443,10 @@ static int cs42l73_i2c_probe(struct i2c_client *i2c_client,
 	i2c_set_clientdata(i2c_client, cs42l73);
 
 	if (cs42l73->pdata.reset_gpio) {
-		ret = gpio_request_one(cs42l73->pdata.reset_gpio,
-				       GPIOF_OUT_INIT_HIGH, "CS42L73 /RST");
+		ret = devm_gpio_request_one(&i2c_client->dev,
+					    cs42l73->pdata.reset_gpio,
+					    GPIOF_OUT_INIT_HIGH,
+					    "CS42L73 /RST");
 		if (ret < 0) {
 			dev_err(&i2c_client->dev, "Failed to request /RST %d: %d\n",
 				cs42l73->pdata.reset_gpio, ret);
-- 
1.8.3.2

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

* Re: [PATCH 1/2] ASoC: cs42l52: Convert to use devm_gpio_request_one
  2014-04-08 14:10 [PATCH 1/2] ASoC: cs42l52: Convert to use devm_gpio_request_one Axel Lin
  2014-04-08 14:11 ` [PATCH 2/2] ASoC: cs42l73: " Axel Lin
@ 2014-04-18 14:14 ` Mark Brown
  1 sibling, 0 replies; 4+ messages in thread
From: Mark Brown @ 2014-04-18 14:14 UTC (permalink / raw)
  To: Axel Lin; +Cc: Brian Austin, alsa-devel, Liam Girdwood, Paul Handrigan


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

On Tue, Apr 08, 2014 at 10:10:33PM +0800, Axel Lin wrote:
> Current code missed a gpio_free() call in cs42l52_i2c_remove().
> Convert to use devm_gpio_request_one() to fix it.

Applied, thanks.

[-- Attachment #1.2: Digital signature --]
[-- Type: application/pgp-signature, Size: 836 bytes --]

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



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

* Re: [PATCH 2/2] ASoC: cs42l73: Convert to use devm_gpio_request_one
  2014-04-08 14:11 ` [PATCH 2/2] ASoC: cs42l73: " Axel Lin
@ 2014-04-18 14:38   ` Mark Brown
  0 siblings, 0 replies; 4+ messages in thread
From: Mark Brown @ 2014-04-18 14:38 UTC (permalink / raw)
  To: Axel Lin; +Cc: Brian Austin, alsa-devel, Liam Girdwood, Paul Handrigan


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

On Tue, Apr 08, 2014 at 10:11:40PM +0800, Axel Lin wrote:
> Current code missed a gpio_free() call in cs42l73_i2c_remove().
> Convert to use devm_gpio_request_one() to fix it.

Applied, thanks.

[-- Attachment #1.2: Digital signature --]
[-- Type: application/pgp-signature, Size: 836 bytes --]

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



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

end of thread, other threads:[~2014-04-18 14:39 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-04-08 14:10 [PATCH 1/2] ASoC: cs42l52: Convert to use devm_gpio_request_one Axel Lin
2014-04-08 14:11 ` [PATCH 2/2] ASoC: cs42l73: " Axel Lin
2014-04-18 14:38   ` Mark Brown
2014-04-18 14:14 ` [PATCH 1/2] ASoC: cs42l52: " Mark Brown

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox