From: Axel Lin <axel.lin@gmail.com>
To: alsa-devel@alsa-project.org
Cc: Philipp Zabel <philipp.zabel@gmail.com>,
Mark Brown <broonie@opensource.wolfsonmicro.com>,
Liam Girdwood <lrg@ti.com>, Lars-Peter Clausen <lars@metafoo.de>
Subject: [PATCH 3/3] ASoC: uda1380: Convert to gpio_request_one()
Date: Sun, 04 Dec 2011 19:38:53 +0800 [thread overview]
Message-ID: <1322998733.12391.4.camel@phoenix> (raw)
In-Reply-To: <1322998520.12391.1.camel@phoenix>
Signed-off-by: Axel Lin <axel.lin@gmail.com>
---
sound/soc/codecs/uda1380.c | 14 ++++----------
1 files changed, 4 insertions(+), 10 deletions(-)
diff --git a/sound/soc/codecs/uda1380.c b/sound/soc/codecs/uda1380.c
index 7ebfbeb..17ae60f 100644
--- a/sound/soc/codecs/uda1380.c
+++ b/sound/soc/codecs/uda1380.c
@@ -732,21 +732,17 @@ static int uda1380_probe(struct snd_soc_codec *codec)
return -EINVAL;
if (gpio_is_valid(pdata->gpio_reset)) {
- ret = gpio_request(pdata->gpio_reset, "uda1380 reset");
+ ret = gpio_request_one(pdata->gpio_reset, GPIOF_OUT_INIT_LOW,
+ "uda1380 reset");
if (ret)
goto err_out;
- ret = gpio_direction_output(pdata->gpio_reset, 0);
- if (ret)
- goto err_gpio_reset_conf;
}
if (gpio_is_valid(pdata->gpio_power)) {
- ret = gpio_request(pdata->gpio_power, "uda1380 power");
+ ret = gpio_request_one(pdata->gpio_power, GPIOF_OUT_INIT_LOW,
+ "uda1380 power");
if (ret)
goto err_gpio;
- ret = gpio_direction_output(pdata->gpio_power, 0);
- if (ret)
- goto err_gpio_power_conf;
}
ret = uda1380_reset(codec);
@@ -775,11 +771,9 @@ static int uda1380_probe(struct snd_soc_codec *codec)
return 0;
err_reset:
-err_gpio_power_conf:
if (gpio_is_valid(pdata->gpio_power))
gpio_free(pdata->gpio_power);
-err_gpio_reset_conf:
err_gpio:
if (gpio_is_valid(pdata->gpio_reset))
gpio_free(pdata->gpio_reset);
--
1.7.5.4
next prev parent reply other threads:[~2011-12-04 11:39 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-12-04 11:35 [PATCH 1/3] ASoC: uda1380: Return proper error in uda1380_modinit failure path Axel Lin
2011-12-04 11:37 ` [PATCH 2/3] ASoC: uda1380: Fix missed uda1380_reset call if pdata->gpio_power is a valid gpio Axel Lin
2011-12-04 13:02 ` Mark Brown
2011-12-04 18:55 ` Vasily
2011-12-04 11:38 ` Axel Lin [this message]
2011-12-04 23:46 ` [PATCH 3/3] ASoC: uda1380: Convert to gpio_request_one() Mark Brown
2011-12-04 13:00 ` [PATCH 1/3] ASoC: uda1380: Return proper error in uda1380_modinit failure path Mark Brown
2011-12-04 13:44 ` Axel Lin
2011-12-04 23:39 ` Mark Brown
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1322998733.12391.4.camel@phoenix \
--to=axel.lin@gmail.com \
--cc=alsa-devel@alsa-project.org \
--cc=broonie@opensource.wolfsonmicro.com \
--cc=lars@metafoo.de \
--cc=lrg@ti.com \
--cc=philipp.zabel@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox