Skip to content

Commit

Permalink
Merge remote-tracking branches 'asoc/topic/ux500', 'asoc/topic/wm8731…
Browse files Browse the repository at this point in the history
…', 'asoc/topic/wm8804', 'asoc/topic/wm8955' and 'asoc/topic/wm8985' into asoc-next
  • Loading branch information
broonie committed May 21, 2014
6 parents 04f8744 + 55bc825 + 3598aad + a308679 + e90c7b4 + a0b148b commit cee429e
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 23 deletions.
7 changes: 2 additions & 5 deletions sound/soc/codecs/wm8731.c
Original file line number Diff line number Diff line change
Expand Up @@ -586,7 +586,7 @@ static int wm8731_probe(struct snd_soc_codec *codec)
for (i = 0; i < ARRAY_SIZE(wm8731->supplies); i++)
wm8731->supplies[i].supply = wm8731_supply_names[i];

ret = regulator_bulk_get(codec->dev, ARRAY_SIZE(wm8731->supplies),
ret = devm_regulator_bulk_get(codec->dev, ARRAY_SIZE(wm8731->supplies),
wm8731->supplies);
if (ret != 0) {
dev_err(codec->dev, "Failed to request supplies: %d\n", ret);
Expand All @@ -597,7 +597,7 @@ static int wm8731_probe(struct snd_soc_codec *codec)
wm8731->supplies);
if (ret != 0) {
dev_err(codec->dev, "Failed to enable supplies: %d\n", ret);
goto err_regulator_get;
return ret;
}

ret = wm8731_reset(codec);
Expand All @@ -624,8 +624,6 @@ static int wm8731_probe(struct snd_soc_codec *codec)

err_regulator_enable:
regulator_bulk_disable(ARRAY_SIZE(wm8731->supplies), wm8731->supplies);
err_regulator_get:
regulator_bulk_free(ARRAY_SIZE(wm8731->supplies), wm8731->supplies);

return ret;
}
Expand All @@ -638,7 +636,6 @@ static int wm8731_remove(struct snd_soc_codec *codec)
wm8731_set_bias_level(codec, SND_SOC_BIAS_OFF);

regulator_bulk_disable(ARRAY_SIZE(wm8731->supplies), wm8731->supplies);
regulator_bulk_free(ARRAY_SIZE(wm8731->supplies), wm8731->supplies);

return 0;
}
Expand Down
7 changes: 2 additions & 5 deletions sound/soc/codecs/wm8804.c
Original file line number Diff line number Diff line change
Expand Up @@ -535,7 +535,6 @@ static int wm8804_remove(struct snd_soc_codec *codec)
for (i = 0; i < ARRAY_SIZE(wm8804->supplies); ++i)
regulator_unregister_notifier(wm8804->supplies[i].consumer,
&wm8804->disable_nb[i]);
regulator_bulk_free(ARRAY_SIZE(wm8804->supplies), wm8804->supplies);
return 0;
}

Expand All @@ -549,7 +548,7 @@ static int wm8804_probe(struct snd_soc_codec *codec)
for (i = 0; i < ARRAY_SIZE(wm8804->supplies); i++)
wm8804->supplies[i].supply = wm8804_supply_names[i];

ret = regulator_bulk_get(codec->dev, ARRAY_SIZE(wm8804->supplies),
ret = devm_regulator_bulk_get(codec->dev, ARRAY_SIZE(wm8804->supplies),
wm8804->supplies);
if (ret) {
dev_err(codec->dev, "Failed to request supplies: %d\n", ret);
Expand All @@ -574,7 +573,7 @@ static int wm8804_probe(struct snd_soc_codec *codec)
wm8804->supplies);
if (ret) {
dev_err(codec->dev, "Failed to enable supplies: %d\n", ret);
goto err_reg_get;
return ret;
}

id1 = snd_soc_read(codec, WM8804_RST_DEVID1);
Expand Down Expand Up @@ -619,8 +618,6 @@ static int wm8804_probe(struct snd_soc_codec *codec)

err_reg_enable:
regulator_bulk_disable(ARRAY_SIZE(wm8804->supplies), wm8804->supplies);
err_reg_get:
regulator_bulk_free(ARRAY_SIZE(wm8804->supplies), wm8804->supplies);
return ret;
}

Expand Down
9 changes: 2 additions & 7 deletions sound/soc/codecs/wm8955.c
Original file line number Diff line number Diff line change
Expand Up @@ -898,7 +898,7 @@ static int wm8955_probe(struct snd_soc_codec *codec)
for (i = 0; i < ARRAY_SIZE(wm8955->supplies); i++)
wm8955->supplies[i].supply = wm8955_supply_names[i];

ret = regulator_bulk_get(codec->dev, ARRAY_SIZE(wm8955->supplies),
ret = devm_regulator_bulk_get(codec->dev, ARRAY_SIZE(wm8955->supplies),
wm8955->supplies);
if (ret != 0) {
dev_err(codec->dev, "Failed to request supplies: %d\n", ret);
Expand All @@ -909,7 +909,7 @@ static int wm8955_probe(struct snd_soc_codec *codec)
wm8955->supplies);
if (ret != 0) {
dev_err(codec->dev, "Failed to enable supplies: %d\n", ret);
goto err_get;
return ret;
}

ret = wm8955_reset(codec);
Expand Down Expand Up @@ -961,17 +961,12 @@ static int wm8955_probe(struct snd_soc_codec *codec)

err_enable:
regulator_bulk_disable(ARRAY_SIZE(wm8955->supplies), wm8955->supplies);
err_get:
regulator_bulk_free(ARRAY_SIZE(wm8955->supplies), wm8955->supplies);
return ret;
}

static int wm8955_remove(struct snd_soc_codec *codec)
{
struct wm8955_priv *wm8955 = snd_soc_codec_get_drvdata(codec);

wm8955_set_bias_level(codec, SND_SOC_BIAS_OFF);
regulator_bulk_free(ARRAY_SIZE(wm8955->supplies), wm8955->supplies);
return 0;
}

Expand Down
7 changes: 2 additions & 5 deletions sound/soc/codecs/wm8985.c
Original file line number Diff line number Diff line change
Expand Up @@ -984,7 +984,6 @@ static int wm8985_remove(struct snd_soc_codec *codec)

wm8985 = snd_soc_codec_get_drvdata(codec);
wm8985_set_bias_level(codec, SND_SOC_BIAS_OFF);
regulator_bulk_free(ARRAY_SIZE(wm8985->supplies), wm8985->supplies);
return 0;
}

Expand All @@ -999,7 +998,7 @@ static int wm8985_probe(struct snd_soc_codec *codec)
for (i = 0; i < ARRAY_SIZE(wm8985->supplies); i++)
wm8985->supplies[i].supply = wm8985_supply_names[i];

ret = regulator_bulk_get(codec->dev, ARRAY_SIZE(wm8985->supplies),
ret = devm_regulator_bulk_get(codec->dev, ARRAY_SIZE(wm8985->supplies),
wm8985->supplies);
if (ret) {
dev_err(codec->dev, "Failed to request supplies: %d\n", ret);
Expand All @@ -1010,7 +1009,7 @@ static int wm8985_probe(struct snd_soc_codec *codec)
wm8985->supplies);
if (ret) {
dev_err(codec->dev, "Failed to enable supplies: %d\n", ret);
goto err_reg_get;
return ret;
}

ret = wm8985_reset(codec);
Expand All @@ -1032,8 +1031,6 @@ static int wm8985_probe(struct snd_soc_codec *codec)

err_reg_enable:
regulator_bulk_disable(ARRAY_SIZE(wm8985->supplies), wm8985->supplies);
err_reg_get:
regulator_bulk_free(ARRAY_SIZE(wm8985->supplies), wm8985->supplies);
return ret;
}

Expand Down
2 changes: 1 addition & 1 deletion sound/soc/ux500/mop500_ab8500.c
Original file line number Diff line number Diff line change
Expand Up @@ -411,7 +411,7 @@ int mop500_ab8500_machine_init(struct snd_soc_pcm_runtime *rtd)
drvdata->mclk_sel = MCLK_ULPCLK;

/* Add controls */
ret = snd_soc_add_card_controls(codec->card, mop500_ab8500_ctrls,
ret = snd_soc_add_card_controls(rtd->card, mop500_ab8500_ctrls,
ARRAY_SIZE(mop500_ab8500_ctrls));
if (ret < 0) {
pr_err("%s: Failed to add machine-controls (%d)!\n",
Expand Down

0 comments on commit cee429e

Please sign in to comment.