Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 283882
b: refs/heads/master
c: 68020db
h: refs/heads/master
v: v3
  • Loading branch information
Axel Lin authored and Mark Brown committed Dec 5, 2011
1 parent d8a67c7 commit 18b78c0
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 21 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: aec60f51e5127fb750b66eb7905047c67372177f
refs/heads/master: 68020db8ac1046e50c758545b75850eb356a0651
28 changes: 8 additions & 20 deletions trunk/sound/soc/codecs/uda1380.c
Original file line number Diff line number Diff line change
Expand Up @@ -732,27 +732,21 @@ static int uda1380_probe(struct snd_soc_codec *codec)
return -EINVAL;

if (gpio_is_valid(pdata->gpio_reset)) {
ret = gpio_request(pdata->gpio_reset, "uda1380 reset");
ret = gpio_request_one(pdata->gpio_reset, GPIOF_OUT_INIT_LOW,
"uda1380 reset");
if (ret)
goto err_out;
ret = gpio_direction_output(pdata->gpio_reset, 0);
if (ret)
goto err_gpio_reset_conf;
}

if (gpio_is_valid(pdata->gpio_power)) {
ret = gpio_request(pdata->gpio_power, "uda1380 power");
if (ret)
goto err_gpio;
ret = gpio_direction_output(pdata->gpio_power, 0);
ret = gpio_request_one(pdata->gpio_power, GPIOF_OUT_INIT_LOW,
"uda1380 power");
if (ret)
goto err_gpio_power_conf;
goto err_free_gpio;
} else {
ret = uda1380_reset(codec);
if (ret) {
dev_err(codec->dev, "Failed to issue reset\n");
goto err_reset;
}
if (ret)
goto err_free_gpio;
}

INIT_WORK(&uda1380->work, uda1380_flush_work);
Expand All @@ -776,13 +770,7 @@ static int uda1380_probe(struct snd_soc_codec *codec)

return 0;

err_reset:
err_gpio_power_conf:
if (gpio_is_valid(pdata->gpio_power))
gpio_free(pdata->gpio_power);

err_gpio_reset_conf:
err_gpio:
err_free_gpio:
if (gpio_is_valid(pdata->gpio_reset))
gpio_free(pdata->gpio_reset);
err_out:
Expand Down

0 comments on commit 18b78c0

Please sign in to comment.