diff options
author | Mark Brown <broonie@opensource.wolfsonmicro.com> | 2012-01-23 10:00:17 -0500 |
---|---|---|
committer | Mark Brown <broonie@opensource.wolfsonmicro.com> | 2012-01-26 13:37:08 -0500 |
commit | 17e3e57b65720628754e9afc6919e30776c0c822 (patch) | |
tree | 1d7dc5cd554150778cfa1e3eed134e8778a74154 /sound/soc/codecs/wm5100.c | |
parent | afe62367e02fd7b83a6a824a20ad432fa5b00040 (diff) |
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, | |||
2504 | for (i = 0; i < ARRAY_SIZE(wm5100->core_supplies); i++) | 2504 | for (i = 0; i < ARRAY_SIZE(wm5100->core_supplies); i++) |
2505 | wm5100->core_supplies[i].supply = wm5100_core_supply_names[i]; | 2505 | wm5100->core_supplies[i].supply = wm5100_core_supply_names[i]; |
2506 | 2506 | ||
2507 | ret = regulator_bulk_get(&i2c->dev, ARRAY_SIZE(wm5100->core_supplies), | 2507 | ret = devm_regulator_bulk_get(&i2c->dev, |
2508 | wm5100->core_supplies); | 2508 | ARRAY_SIZE(wm5100->core_supplies), |
2509 | wm5100->core_supplies); | ||
2509 | if (ret != 0) { | 2510 | if (ret != 0) { |
2510 | dev_err(&i2c->dev, "Failed to request core supplies: %d\n", | 2511 | dev_err(&i2c->dev, "Failed to request core supplies: %d\n", |
2511 | ret); | 2512 | ret); |
@@ -2517,7 +2518,7 @@ static __devinit int wm5100_i2c_probe(struct i2c_client *i2c, | |||
2517 | if (ret != 0) { | 2518 | if (ret != 0) { |
2518 | dev_err(&i2c->dev, "Failed to enable core supplies: %d\n", | 2519 | dev_err(&i2c->dev, "Failed to enable core supplies: %d\n", |
2519 | ret); | 2520 | ret); |
2520 | goto err_core; | 2521 | goto err_regmap; |
2521 | } | 2522 | } |
2522 | 2523 | ||
2523 | if (wm5100->pdata.ldo_ena) { | 2524 | if (wm5100->pdata.ldo_ena) { |
@@ -2686,9 +2687,6 @@ err_ldo: | |||
2686 | err_enable: | 2687 | err_enable: |
2687 | regulator_bulk_disable(ARRAY_SIZE(wm5100->core_supplies), | 2688 | regulator_bulk_disable(ARRAY_SIZE(wm5100->core_supplies), |
2688 | wm5100->core_supplies); | 2689 | wm5100->core_supplies); |
2689 | err_core: | ||
2690 | regulator_bulk_free(ARRAY_SIZE(wm5100->core_supplies), | ||
2691 | wm5100->core_supplies); | ||
2692 | err_regmap: | 2690 | err_regmap: |
2693 | regmap_exit(wm5100->regmap); | 2691 | regmap_exit(wm5100->regmap); |
2694 | err: | 2692 | err: |
@@ -2711,8 +2709,6 @@ static __devexit int wm5100_i2c_remove(struct i2c_client *i2c) | |||
2711 | gpio_set_value_cansleep(wm5100->pdata.ldo_ena, 0); | 2709 | gpio_set_value_cansleep(wm5100->pdata.ldo_ena, 0); |
2712 | gpio_free(wm5100->pdata.ldo_ena); | 2710 | gpio_free(wm5100->pdata.ldo_ena); |
2713 | } | 2711 | } |
2714 | regulator_bulk_free(ARRAY_SIZE(wm5100->core_supplies), | ||
2715 | wm5100->core_supplies); | ||
2716 | regmap_exit(wm5100->regmap); | 2712 | regmap_exit(wm5100->regmap); |
2717 | 2713 | ||
2718 | return 0; | 2714 | return 0; |