diff mbox

[1/2] ASoC: cs42l52: Convert to use devm_gpio_request_one

Message ID 1396966233.14167.1.camel@phoenix (mailing list archive)
State Accepted
Commit 4e17d2d33abe4b523f79fec037ef66ba93643f65
Headers show

Commit Message

Axel Lin April 8, 2014, 2:10 p.m. UTC
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(-)

Comments

Mark Brown April 18, 2014, 2:14 p.m. UTC | #1
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.
diff mbox

Patch

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