Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 316205
b: refs/heads/master
c: ec02995
h: refs/heads/master
i:
  316203: 757294f
v: v3
  • Loading branch information
Mark Brown committed Jun 4, 2012
1 parent 43945fa commit b3708e0
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 695594f1b79d3b88e99e28f06afaab32c4d65853
refs/heads/master: ec02995adad5a7b428f46c1a87fae1bc93d6dfe3
6 changes: 6 additions & 0 deletions trunk/sound/soc/soc-dapm.c
Original file line number Diff line number Diff line change
Expand Up @@ -1011,12 +1011,14 @@ int dapm_clock_event(struct snd_soc_dapm_widget *w,
if (!w->clk)
return -EIO;

#ifdef CONFIG_HAVE_CLK
if (SND_SOC_DAPM_EVENT_ON(event)) {
return clk_enable(w->clk);
} else {
clk_disable(w->clk);
return 0;
}
#endif
}
EXPORT_SYMBOL_GPL(dapm_clock_event);

Expand Down Expand Up @@ -2902,13 +2904,17 @@ snd_soc_dapm_new_control(struct snd_soc_dapm_context *dapm,
}
break;
case snd_soc_dapm_clock_supply:
#ifdef CONFIG_HAVE_CLK
w->clk = devm_clk_get(dapm->dev, w->name);
if (IS_ERR(w->clk)) {
ret = PTR_ERR(w->clk);
dev_err(dapm->dev, "Failed to request %s: %d\n",
w->name, ret);
return NULL;
}
#else
return NULL;
#endif
break;
default:
break;
Expand Down

0 comments on commit b3708e0

Please sign in to comment.