From: Peter Ujfalusi <peter.ujfalusi@ti.com>
To: Axel Lin <axel.lin@ingics.com>, Mark Brown <broonie@kernel.org>
Cc: alsa-devel@alsa-project.org, Liam Girdwood <lgirdwood@gmail.com>,
Dan Murphy <dmurphy@ti.com>
Subject: Re: [PATCH] ASoC: tas2552: Use devm_gpiod_get_optional for enable-gpio
Date: Thu, 11 Jun 2015 13:22:55 +0300 [thread overview]
Message-ID: <5579617F.3050106@ti.com> (raw)
In-Reply-To: <1433947565.19912.1.camel@ingics.com>
On 06/10/2015 05:46 PM, Axel Lin wrote:
> commit ea178d1456dc ("ASoC: tas2552: Make the enable-gpio really optional")
> makes enable-gpio optional. devm_gpiod_get_optional() is the better
> function for optional gpio, so let's switch to use it.
>
> Signed-off-by: Axel Lin <axel.lin@ingics.com>
Acked-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
> ---
> sound/soc/codecs/tas2552.c | 11 ++++-------
> 1 file changed, 4 insertions(+), 7 deletions(-)
>
> diff --git a/sound/soc/codecs/tas2552.c b/sound/soc/codecs/tas2552.c
> index 169a703..4f25a7d 100644
> --- a/sound/soc/codecs/tas2552.c
> +++ b/sound/soc/codecs/tas2552.c
> @@ -703,13 +703,10 @@ static int tas2552_probe(struct i2c_client *client,
> if (data == NULL)
> return -ENOMEM;
>
> - data->enable_gpio = devm_gpiod_get(dev, "enable", GPIOD_OUT_LOW);
> - if (IS_ERR(data->enable_gpio)) {
> - if (PTR_ERR(data->enable_gpio) == -EPROBE_DEFER)
> - return -EPROBE_DEFER;
> -
> - data->enable_gpio = NULL;
> - }
> + data->enable_gpio = devm_gpiod_get_optional(dev, "enable",
> + GPIOD_OUT_LOW);
> + if (IS_ERR(data->enable_gpio))
> + return PTR_ERR(data->enable_gpio);
>
> data->tas2552_client = client;
> data->regmap = devm_regmap_init_i2c(client, &tas2552_regmap_config);
>
--
Péter
_______________________________________________
Alsa-devel mailing list
Alsa-devel@alsa-project.org
http://mailman.alsa-project.org/mailman/listinfo/alsa-devel
next prev parent reply other threads:[~2015-06-11 10:23 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-06-10 14:46 [PATCH] ASoC: tas2552: Use devm_gpiod_get_optional for enable-gpio Axel Lin
2015-06-11 10:22 ` Peter Ujfalusi [this message]
2015-06-11 10:42 ` 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=5579617F.3050106@ti.com \
--to=peter.ujfalusi@ti.com \
--cc=alsa-devel@alsa-project.org \
--cc=axel.lin@ingics.com \
--cc=broonie@kernel.org \
--cc=dmurphy@ti.com \
--cc=lgirdwood@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