ASoC: tlv320aic32x4: Use gpio_is_valid()
Subsystems (3)
PATCH 1/1 ASoC: tlv320aic32x4: Use gpio_is_valid()
From: Fabio Estevam <[email protected]>
We could use gpio_is_valid() for doing the sanity check on the GPIO number.
Signed-off-by Fabio Estevam <[email protected]>
--- sound/soc/codecs/tlv320aic32x4.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
sound/soc/codecs/tlv320aic32x4.c +1 -1
@@ -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 )
Signature · 1 line
1.8.1.2
Hi Fabio,
Quoted 5 lines · Fabio Estevam
From: Fabio Estevam <[email protected]>
We could use
gpio_is_valid()for doing the sanity check on the GPIO number.Signed-off-by Fabio Estevam <[email protected]>
This looks like the same patch as [1].
[1] http://thread.gmane.org/gmane.linux.alsa.devel/117668/focus=117669
Regards,
Markus
Signature · 4 lines
Pengutronix e.K. | | Industrial Linux Solutions | http://www.pengutronix.de/ | Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 | Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |