[prev in list] [next in list] [prev in thread] [next in thread]
List: git-commits-head
Subject: ASoC: cs42l52: Convert to use devm_gpio_request_one
From: "Linux Kernel Mailing List" <linux-kernel () vger ! kernel ! org>
Date: 2014-04-30 15:36:28
Message-ID: 20140430153628.3B9C1660826 () gitolite ! kernel ! org
[Download RAW message or body]
Gitweb: http://git.kernel.org/linus/;a=commit;h=4e17d2d33abe4b523f79fec037ef66ba93643f65
Commit: 4e17d2d33abe4b523f79fec037ef66ba93643f65
Parent: c9eaa447e77efe77b7fa4c953bd62de8297fd6c5
Author: Axel Lin <axel.lin@ingics.com>
AuthorDate: Tue Apr 8 22:10:33 2014 +0800
Committer: Mark Brown <broonie@linaro.org>
CommitDate: Fri Apr 18 15:14:39 2014 +0100
ASoC: cs42l52: Convert to use devm_gpio_request_one
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>
Signed-off-by: Mark Brown <broonie@linaro.org>
---
sound/soc/codecs/cs42l52.c | 6 ++++--
1 files 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);
--
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic