Skip to content

Commit

Permalink
ASoC: omap: n810: Convert to clk_prepare_enable/clk_disable_unprepare
Browse files Browse the repository at this point in the history
N810 audio driver has stopped working at some point. Probably when
OMAP2 was converted to common clock framework since now call to clk_enable
dumps the stack trace in drivers/clk/clk.c: __clk_enable() due
clk->prepare_count is zero.

Fix this by converting clk_enable/_disable calls to those that take care
of clock prepare/unprepare.

I'm not queueing this to linux-stable since OMAP2 common clock framework
conversion in commit ed1ebc4 ("ARM: OMAP2: clock: Convert to common clk")
happened before N810 was really usable in mainline and user base for N810 is
anyway small. Potential linux-stable candidates are only those after
commit 3d3a6d1 ("watchdog: introduce retu_wdt driver").

Signed-off-by: Jarkko Nikula <jarkko.nikula@bitmer.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
  • Loading branch information
Jarkko Nikula authored and Mark Brown committed Dec 2, 2013
1 parent 6ce4eac commit fb28a75
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions sound/soc/omap/n810.c
Original file line number Diff line number Diff line change
Expand Up @@ -100,12 +100,12 @@ static int n810_startup(struct snd_pcm_substream *substream)
SNDRV_PCM_HW_PARAM_CHANNELS, 2, 2);

n810_ext_control(&codec->dapm);
return clk_enable(sys_clkout2);
return clk_prepare_enable(sys_clkout2);
}

static void n810_shutdown(struct snd_pcm_substream *substream)
{
clk_disable(sys_clkout2);
clk_disable_unprepare(sys_clkout2);
}

static int n810_hw_params(struct snd_pcm_substream *substream,
Expand Down

0 comments on commit fb28a75

Please sign in to comment.