summaryrefslogtreecommitdiffstats
path: root/sound
diff options
context:
space:
mode:
authorAxel Lin <axel.lin@ingics.com>2014-04-08 22:11:40 +0800
committerMark Brown <broonie@linaro.org>2014-04-18 15:15:11 +0100
commit2b21694f153a0df88dca7fb4ce04614ea7ff9dc2 (patch)
treeb7bd36c3c5052e0d959ef3020e07b40751518a23 /sound
parentc9eaa447e77efe77b7fa4c953bd62de8297fd6c5 (diff)
downloadop-kernel-dev-2b21694f153a0df88dca7fb4ce04614ea7ff9dc2.zip
op-kernel-dev-2b21694f153a0df88dca7fb4ce04614ea7ff9dc2.tar.gz
ASoC: cs42l73: Convert to use devm_gpio_request_one
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> Signed-off-by: Mark Brown <broonie@linaro.org>
Diffstat (limited to 'sound')
-rw-r--r--sound/soc/codecs/cs42l73.c6
1 files 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);
OpenPOWER on IntegriCloud