Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 342945
b: refs/heads/master
c: 65c6283
h: refs/heads/master
i:
  342943: 56b989e
v: v3
  • Loading branch information
Mark Brown committed Dec 9, 2012
1 parent 2582173 commit 42e3a54
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 12 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: 47f07b77f23224fd8414fe68cb937be410d4f946
refs/heads/master: 65c62837a7410ffef5c4d29dd0a866956795ce02
14 changes: 3 additions & 11 deletions trunk/sound/soc/codecs/wm8400.c
Original file line number Diff line number Diff line change
Expand Up @@ -1373,7 +1373,7 @@ static int wm8400_codec_probe(struct snd_soc_codec *codec)
codec->control_data = priv->wm8400 = wm8400;
priv->codec = codec;

ret = regulator_bulk_get(wm8400->dev,
ret = devm_regulator_bulk_get(wm8400->dev,
ARRAY_SIZE(power), &power[0]);
if (ret != 0) {
dev_err(codec->dev, "Failed to get regulators: %d\n", ret);
Expand All @@ -1398,15 +1398,9 @@ static int wm8400_codec_probe(struct snd_soc_codec *codec)
snd_soc_write(codec, WM8400_LEFT_OUTPUT_VOLUME, 0x50 | (1<<8));
snd_soc_write(codec, WM8400_RIGHT_OUTPUT_VOLUME, 0x50 | (1<<8));

if (!schedule_work(&priv->work)) {
ret = -EINVAL;
goto err_regulator;
}
if (!schedule_work(&priv->work))
return -EINVAL;
return 0;

err_regulator:
regulator_bulk_free(ARRAY_SIZE(power), power);
return ret;
}

static int wm8400_codec_remove(struct snd_soc_codec *codec)
Expand All @@ -1417,8 +1411,6 @@ static int wm8400_codec_remove(struct snd_soc_codec *codec)
snd_soc_write(codec, WM8400_POWER_MANAGEMENT_1,
reg & (~WM8400_CODEC_ENA));

regulator_bulk_free(ARRAY_SIZE(power), power);

return 0;
}

Expand Down

0 comments on commit 42e3a54

Please sign in to comment.