]> git.proxmox.com Git - mirror_ubuntu-eoan-kernel.git/commitdiff
ASoC: wm8350: Use devm_regulator_bulk_get
authorSachin Kamat <sachin.kamat@linaro.org>
Mon, 26 Nov 2012 11:49:34 +0000 (17:19 +0530)
committerMark Brown <broonie@opensource.wolfsonmicro.com>
Wed, 28 Nov 2012 17:38:26 +0000 (17:38 +0000)
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>
sound/soc/codecs/wm8350.c

index a4cae060bf2626de702f88c4b62dee0e3f110860..32b8f0852f6e69fb1b015c2e07714eb0a6648ff9 100644 (file)
@@ -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;
 }