aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMarkus Pargmann <mpa@pengutronix.de>2014-01-16 10:30:25 -0500
committerMark Brown <broonie@linaro.org>2014-02-03 07:46:37 -0500
commita74ab5121f8d91fb7f13ac1c86e72e9d35e0bc29 (patch)
tree6d8a92e2ed0dfc5569615b84ddcb4d77c01c500e
parent38dbfb59d1175ef458d006556061adeaa8751b72 (diff)
ASoC: tlv320aic32x4: Use gpio_is_valid
Use function gpio_is_valid to check for gpio ports. Signed-off-by: Markus Pargmann <mpa@pengutronix.de> Signed-off-by: Mark Brown <broonie@linaro.org>
-rw-r--r--sound/soc/codecs/tlv320aic32x4.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/sound/soc/codecs/tlv320aic32x4.c b/sound/soc/codecs/tlv320aic32x4.c
index 688151ba309a..36a9cb90a585 100644
--- a/sound/soc/codecs/tlv320aic32x4.c
+++ b/sound/soc/codecs/tlv320aic32x4.c
@@ -588,7 +588,7 @@ static int aic32x4_probe(struct snd_soc_codec *codec)
588 588
589 snd_soc_codec_set_cache_io(codec, 8, 8, SND_SOC_REGMAP); 589 snd_soc_codec_set_cache_io(codec, 8, 8, SND_SOC_REGMAP);
590 590
591 if (aic32x4->rstn_gpio >= 0) { 591 if (gpio_is_valid(aic32x4->rstn_gpio)) {
592 ndelay(10); 592 ndelay(10);
593 gpio_set_value(aic32x4->rstn_gpio, 1); 593 gpio_set_value(aic32x4->rstn_gpio, 1);
594 } 594 }
@@ -693,7 +693,7 @@ static int aic32x4_i2c_probe(struct i2c_client *i2c,
693 aic32x4->rstn_gpio = -1; 693 aic32x4->rstn_gpio = -1;
694 } 694 }
695 695
696 if (aic32x4->rstn_gpio >= 0) { 696 if (gpio_is_valid(aic32x4->rstn_gpio)) {
697 ret = devm_gpio_request_one(&i2c->dev, aic32x4->rstn_gpio, 697 ret = devm_gpio_request_one(&i2c->dev, aic32x4->rstn_gpio,
698 GPIOF_OUT_INIT_LOW, "tlv320aic32x4 rstn"); 698 GPIOF_OUT_INIT_LOW, "tlv320aic32x4 rstn");
699 if (ret != 0) 699 if (ret != 0)