Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 230277
b: refs/heads/master
c: 79ee820
h: refs/heads/master
i:
  230275: 4459682
v: v3
  • Loading branch information
Jarkko Nikula authored and Liam Girdwood committed Nov 3, 2010
1 parent cf6cdd9 commit 063d047
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 33ee617f4dad370bee016e4462e69481257453b0
refs/heads/master: 79ee820d2aa24ac2577ca4e89ecc49c26d099707
10 changes: 5 additions & 5 deletions trunk/sound/soc/codecs/tlv320aic3x.c
Original file line number Diff line number Diff line change
Expand Up @@ -1075,7 +1075,7 @@ static int aic3x_regulator_event(struct notifier_block *nb,
* Put codec to reset and require cache sync as at least one
* of the supplies was disabled
*/
if (aic3x->gpio_reset >= 0)
if (gpio_is_valid(aic3x->gpio_reset))
gpio_set_value(aic3x->gpio_reset, 0);
aic3x->codec->cache_sync = 1;
}
Expand All @@ -1102,7 +1102,7 @@ static int aic3x_set_power(struct snd_soc_codec *codec, int power)
if (!codec->cache_sync)
goto out;

if (aic3x->gpio_reset >= 0) {
if (gpio_is_valid(aic3x->gpio_reset)) {
udelay(1);
gpio_set_value(aic3x->gpio_reset, 1);
}
Expand Down Expand Up @@ -1359,7 +1359,7 @@ static int aic3x_probe(struct snd_soc_codec *codec)
return ret;
}

if (aic3x->gpio_reset >= 0) {
if (gpio_is_valid(aic3x->gpio_reset)) {
ret = gpio_request(aic3x->gpio_reset, "tlv320aic3x reset");
if (ret != 0)
goto err_gpio;
Expand Down Expand Up @@ -1414,7 +1414,7 @@ static int aic3x_probe(struct snd_soc_codec *codec)
&aic3x->disable_nb[i].nb);
regulator_bulk_free(ARRAY_SIZE(aic3x->supplies), aic3x->supplies);
err_get:
if (aic3x->gpio_reset >= 0)
if (gpio_is_valid(aic3x->gpio_reset))
gpio_free(aic3x->gpio_reset);
err_gpio:
kfree(aic3x);
Expand All @@ -1427,7 +1427,7 @@ static int aic3x_remove(struct snd_soc_codec *codec)
int i;

aic3x_set_bias_level(codec, SND_SOC_BIAS_OFF);
if (aic3x->gpio_reset >= 0) {
if (gpio_is_valid(aic3x->gpio_reset)) {
gpio_set_value(aic3x->gpio_reset, 0);
gpio_free(aic3x->gpio_reset);
}
Expand Down

0 comments on commit 063d047

Please sign in to comment.