diff options
author | Mark Brown <broonie@opensource.wolfsonmicro.com> | 2012-01-23 19:00:17 +0400 |
---|---|---|
committer | Mark Brown <broonie@opensource.wolfsonmicro.com> | 2012-01-26 22:37:08 +0400 |
commit | 17e3e57b65720628754e9afc6919e30776c0c822 (patch) | |
tree | 1d7dc5cd554150778cfa1e3eed134e8778a74154 /sound/soc/codecs/wm5100.c | |
parent | afe62367e02fd7b83a6a824a20ad432fa5b00040 (diff) | |
download | linux-17e3e57b65720628754e9afc6919e30776c0c822.tar.xz |
ASoC: wm5100: Convert to devm_regulator_bulk_get()
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Diffstat (limited to 'sound/soc/codecs/wm5100.c')
-rw-r--r-- | sound/soc/codecs/wm5100.c | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/sound/soc/codecs/wm5100.c b/sound/soc/codecs/wm5100.c index c1c8bdb7bb01..39de946bf259 100644 --- a/sound/soc/codecs/wm5100.c +++ b/sound/soc/codecs/wm5100.c @@ -2504,8 +2504,9 @@ static __devinit int wm5100_i2c_probe(struct i2c_client *i2c, for (i = 0; i < ARRAY_SIZE(wm5100->core_supplies); i++) wm5100->core_supplies[i].supply = wm5100_core_supply_names[i]; - ret = regulator_bulk_get(&i2c->dev, ARRAY_SIZE(wm5100->core_supplies), - wm5100->core_supplies); + ret = devm_regulator_bulk_get(&i2c->dev, + ARRAY_SIZE(wm5100->core_supplies), + wm5100->core_supplies); if (ret != 0) { dev_err(&i2c->dev, "Failed to request core supplies: %d\n", ret); @@ -2517,7 +2518,7 @@ static __devinit int wm5100_i2c_probe(struct i2c_client *i2c, if (ret != 0) { dev_err(&i2c->dev, "Failed to enable core supplies: %d\n", ret); - goto err_core; + goto err_regmap; } if (wm5100->pdata.ldo_ena) { @@ -2686,9 +2687,6 @@ err_ldo: err_enable: regulator_bulk_disable(ARRAY_SIZE(wm5100->core_supplies), wm5100->core_supplies); -err_core: - regulator_bulk_free(ARRAY_SIZE(wm5100->core_supplies), - wm5100->core_supplies); err_regmap: regmap_exit(wm5100->regmap); err: @@ -2711,8 +2709,6 @@ static __devexit int wm5100_i2c_remove(struct i2c_client *i2c) gpio_set_value_cansleep(wm5100->pdata.ldo_ena, 0); gpio_free(wm5100->pdata.ldo_ena); } - regulator_bulk_free(ARRAY_SIZE(wm5100->core_supplies), - wm5100->core_supplies); regmap_exit(wm5100->regmap); return 0; |