Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 305532
b: refs/heads/master
c: a3cc056
h: refs/heads/master
v: v3
  • Loading branch information
Liam Girdwood authored and Mark Brown committed Apr 1, 2012
1 parent a0ab865 commit 469cf1b
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 6 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 3cd043436c2d5d6f8e9a5395d02ba966f0dfdf84
refs/heads/master: a3cc056b64065efaf98d3e3fe8a6b9d508121492
2 changes: 2 additions & 0 deletions trunk/include/sound/soc-dapm.h
Original file line number Diff line number Diff line change
Expand Up @@ -324,6 +324,7 @@ struct snd_soc_dapm_path;
struct snd_soc_dapm_pin;
struct snd_soc_dapm_route;
struct snd_soc_dapm_context;
struct regulator;

int dapm_reg_event(struct snd_soc_dapm_widget *w,
struct snd_kcontrol *kcontrol, int event);
Expand Down Expand Up @@ -487,6 +488,7 @@ struct snd_soc_dapm_widget {
struct snd_soc_dapm_context *dapm;

void *priv; /* widget specific data */
struct regulator *regulator; /* attached regulator */

/* dapm control */
short reg; /* negative reg = no direct dapm */
Expand Down
10 changes: 5 additions & 5 deletions trunk/sound/soc/soc-dapm.c
Original file line number Diff line number Diff line change
Expand Up @@ -861,9 +861,9 @@ int dapm_regulator_event(struct snd_soc_dapm_widget *w,
struct snd_kcontrol *kcontrol, int event)
{
if (SND_SOC_DAPM_EVENT_ON(event))
return regulator_enable(w->priv);
return regulator_enable(w->regulator);
else
return regulator_disable_deferred(w->priv, w->shift);
return regulator_disable_deferred(w->regulator, w->shift);
}
EXPORT_SYMBOL_GPL(dapm_regulator_event);

Expand Down Expand Up @@ -2768,9 +2768,9 @@ snd_soc_dapm_new_control(struct snd_soc_dapm_context *dapm,

switch (w->id) {
case snd_soc_dapm_regulator_supply:
w->priv = devm_regulator_get(dapm->dev, w->name);
if (IS_ERR(w->priv)) {
ret = PTR_ERR(w->priv);
w->regulator = devm_regulator_get(dapm->dev, w->name);
if (IS_ERR(w->regulator)) {
ret = PTR_ERR(w->regulator);
dev_err(dapm->dev, "Failed to request %s: %d\n",
w->name, ret);
return NULL;
Expand Down

0 comments on commit 469cf1b

Please sign in to comment.