diff options
author | Mark Brown <broonie@opensource.wolfsonmicro.com> | 2012-12-02 13:35:20 +0900 |
---|---|---|
committer | Mark Brown <broonie@opensource.wolfsonmicro.com> | 2012-12-02 13:35:20 +0900 |
commit | f5fa83cc621ae81f81ebd5a19c89649bd76b6eaa (patch) | |
tree | e9873f1ed208c6c48f7c070c813eae2fba61d8e2 /sound | |
parent | 39a329b14e34ae151c2cce05e5365e90daa4a03b (diff) | |
parent | 95a5b240e40fc7ab226e59fb8298a2ca4faf7657 (diff) | |
download | linux-3.10-f5fa83cc621ae81f81ebd5a19c89649bd76b6eaa.tar.gz linux-3.10-f5fa83cc621ae81f81ebd5a19c89649bd76b6eaa.tar.bz2 linux-3.10-f5fa83cc621ae81f81ebd5a19c89649bd76b6eaa.zip |
Merge remote-tracking branch 'asoc/topic/wm8400' into asoc-next
Diffstat (limited to 'sound')
-rw-r--r-- | sound/soc/codecs/wm8400.c | 14 |
1 files changed, 3 insertions, 11 deletions
diff --git a/sound/soc/codecs/wm8400.c b/sound/soc/codecs/wm8400.c index 5d277a915f8..262c44082eb 100644 --- a/sound/soc/codecs/wm8400.c +++ b/sound/soc/codecs/wm8400.c @@ -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); @@ -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) @@ -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; } |