* [PATCH 1/2] ASoC: dapm: Use devm_clk_get()
@ 2012-06-04 7:19 Mark Brown
2012-06-04 7:19 ` [PATCH 2/2] ASoC: dapm: Bodge for lack of a widely available clk API Mark Brown
2012-06-04 9:36 ` [PATCH 1/2] ASoC: dapm: Use devm_clk_get() Liam Girdwood
0 siblings, 2 replies; 3+ messages in thread
From: Mark Brown @ 2012-06-04 7:19 UTC (permalink / raw)
To: Liam Girdwood; +Cc: alsa-devel, Mark Brown
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
---
sound/soc/soc-dapm.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/sound/soc/soc-dapm.c b/sound/soc/soc-dapm.c
index 3bb7a6f..a66379a 100644
--- a/sound/soc/soc-dapm.c
+++ b/sound/soc/soc-dapm.c
@@ -2902,7 +2902,7 @@ snd_soc_dapm_new_control(struct snd_soc_dapm_context *dapm,
}
break;
case snd_soc_dapm_clock_supply:
- w->clk = clk_get(dapm->dev, w->name);
+ 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",
--
1.7.10
^ permalink raw reply related [flat|nested] 3+ messages in thread
* [PATCH 2/2] ASoC: dapm: Bodge for lack of a widely available clk API
2012-06-04 7:19 [PATCH 1/2] ASoC: dapm: Use devm_clk_get() Mark Brown
@ 2012-06-04 7:19 ` Mark Brown
2012-06-04 9:36 ` [PATCH 1/2] ASoC: dapm: Use devm_clk_get() Liam Girdwood
1 sibling, 0 replies; 3+ messages in thread
From: Mark Brown @ 2012-06-04 7:19 UTC (permalink / raw)
To: Liam Girdwood; +Cc: alsa-devel, Mark Brown
Reported-by: Stephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
---
sound/soc/soc-dapm.c | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/sound/soc/soc-dapm.c b/sound/soc/soc-dapm.c
index a66379a..11a88d8 100644
--- a/sound/soc/soc-dapm.c
+++ b/sound/soc/soc-dapm.c
@@ -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);
@@ -2902,6 +2904,7 @@ 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);
@@ -2909,6 +2912,9 @@ snd_soc_dapm_new_control(struct snd_soc_dapm_context *dapm,
w->name, ret);
return NULL;
}
+#else
+ return NULL
+#endif
break;
default:
break;
--
1.7.10
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH 1/2] ASoC: dapm: Use devm_clk_get()
2012-06-04 7:19 [PATCH 1/2] ASoC: dapm: Use devm_clk_get() Mark Brown
2012-06-04 7:19 ` [PATCH 2/2] ASoC: dapm: Bodge for lack of a widely available clk API Mark Brown
@ 2012-06-04 9:36 ` Liam Girdwood
1 sibling, 0 replies; 3+ messages in thread
From: Liam Girdwood @ 2012-06-04 9:36 UTC (permalink / raw)
To: Mark Brown; +Cc: alsa-devel
On Mon, 2012-06-04 at 08:19 +0100, Mark Brown wrote:
> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
> ---
> sound/soc/soc-dapm.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/sound/soc/soc-dapm.c b/sound/soc/soc-dapm.c
> index 3bb7a6f..a66379a 100644
> --- a/sound/soc/soc-dapm.c
> +++ b/sound/soc/soc-dapm.c
> @@ -2902,7 +2902,7 @@ snd_soc_dapm_new_control(struct snd_soc_dapm_context *dapm,
> }
> break;
> case snd_soc_dapm_clock_supply:
> - w->clk = clk_get(dapm->dev, w->name);
> + 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",
Both
Acked-by: Liam Girdwood <lrg@ti.com>
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2012-06-04 9:36 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-06-04 7:19 [PATCH 1/2] ASoC: dapm: Use devm_clk_get() Mark Brown
2012-06-04 7:19 ` [PATCH 2/2] ASoC: dapm: Bodge for lack of a widely available clk API Mark Brown
2012-06-04 9:36 ` [PATCH 1/2] ASoC: dapm: Use devm_clk_get() Liam Girdwood
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox