[alsa-devel] [PATCH] ASoC: tlv320aic32x4: Use gpio_is_valid()
From: Fabio Estevam fabio.estevam@freescale.com
We could use gpio_is_valid() for doing the sanity check on the GPIO number.
Signed-off-by: Fabio Estevam fabio.estevam@freescale.com --- sound/soc/codecs/tlv320aic32x4.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/sound/soc/codecs/tlv320aic32x4.c b/sound/soc/codecs/tlv320aic32x4.c index 385dec1..02d2d3c 100644 --- a/sound/soc/codecs/tlv320aic32x4.c +++ b/sound/soc/codecs/tlv320aic32x4.c @@ -687,7 +687,7 @@ static int aic32x4_i2c_probe(struct i2c_client *i2c, aic32x4->rstn_gpio = -1; }
- if (aic32x4->rstn_gpio >= 0) { + if (gpio_is_valid(aic32x4->rstn_gpio)) { ret = devm_gpio_request_one(&i2c->dev, aic32x4->rstn_gpio, GPIOF_OUT_INIT_LOW, "tlv320aic32x4 rstn"); if (ret != 0)
Hi Fabio,
On Wed, Jan 22, 2014 at 05:24:17PM -0200, Fabio Estevam wrote:
From: Fabio Estevam fabio.estevam@freescale.com
We could use gpio_is_valid() for doing the sanity check on the GPIO number.
Signed-off-by: Fabio Estevam fabio.estevam@freescale.com
This looks like the same patch as [1].
[1] http://thread.gmane.org/gmane.linux.alsa.devel/117668/focus=117669
Regards,
Markus
participants (2)
-
Fabio Estevam
-
Markus Pargmann