diff options
author | Sachin Kamat <sachin.kamat@linaro.org> | 2012-11-26 15:49:34 +0400 |
---|---|---|
committer | Mark Brown <broonie@opensource.wolfsonmicro.com> | 2012-11-28 21:38:26 +0400 |
commit | 5851e9b89d9a3dc38fbd68efac95fac7f7f85b5a (patch) | |
tree | 9ecad77357273782cde4547eda2fbc5d0be703b7 /sound/soc/codecs/wm8350.c | |
parent | 9489e9dcae718d5fde988e4a684a0f55b5f94d17 (diff) | |
download | linux-5851e9b89d9a3dc38fbd68efac95fac7f7f85b5a.tar.xz |
ASoC: wm8350: Use devm_regulator_bulk_get
devm_regulator_bulk_get() is device managed and makes error
handling and code cleanup simpler.
Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Diffstat (limited to 'sound/soc/codecs/wm8350.c')
-rw-r--r-- | sound/soc/codecs/wm8350.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/sound/soc/codecs/wm8350.c b/sound/soc/codecs/wm8350.c index a4cae060bf26..32b8f0852f6e 100644 --- a/sound/soc/codecs/wm8350.c +++ b/sound/soc/codecs/wm8350.c @@ -1500,7 +1500,7 @@ static int wm8350_codec_probe(struct snd_soc_codec *codec) for (i = 0; i < ARRAY_SIZE(supply_names); i++) priv->supplies[i].supply = supply_names[i]; - ret = regulator_bulk_get(wm8350->dev, ARRAY_SIZE(priv->supplies), + ret = devm_regulator_bulk_get(wm8350->dev, ARRAY_SIZE(priv->supplies), priv->supplies); if (ret != 0) return ret; @@ -1607,8 +1607,6 @@ static int wm8350_codec_remove(struct snd_soc_codec *codec) wm8350_clear_bits(wm8350, WM8350_POWER_MGMT_5, WM8350_CODEC_ENA); - regulator_bulk_free(ARRAY_SIZE(priv->supplies), priv->supplies); - return 0; } |