Commit 2b21694f authored by Axel Lin's avatar Axel Lin Committed by Mark Brown

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: default avatarAxel Lin <axel.lin@ingics.com>
Signed-off-by: default avatarMark Brown <broonie@linaro.org>
parent c9eaa447
...@@ -1443,8 +1443,10 @@ static int cs42l73_i2c_probe(struct i2c_client *i2c_client, ...@@ -1443,8 +1443,10 @@ static int cs42l73_i2c_probe(struct i2c_client *i2c_client,
i2c_set_clientdata(i2c_client, cs42l73); i2c_set_clientdata(i2c_client, cs42l73);
if (cs42l73->pdata.reset_gpio) { if (cs42l73->pdata.reset_gpio) {
ret = gpio_request_one(cs42l73->pdata.reset_gpio, ret = devm_gpio_request_one(&i2c_client->dev,
GPIOF_OUT_INIT_HIGH, "CS42L73 /RST"); cs42l73->pdata.reset_gpio,
GPIOF_OUT_INIT_HIGH,
"CS42L73 /RST");
if (ret < 0) { if (ret < 0) {
dev_err(&i2c_client->dev, "Failed to request /RST %d: %d\n", dev_err(&i2c_client->dev, "Failed to request /RST %d: %d\n",
cs42l73->pdata.reset_gpio, ret); cs42l73->pdata.reset_gpio, ret);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment