Skip to content

Commit

Permalink
ASoC: Use core pm_runtime callbacks for omap-dmic
Browse files Browse the repository at this point in the history
Now that the core holds a pm_runtime reference to the device while the
link is active there is no need for the driver to do so.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
  • Loading branch information
Mark Brown committed Dec 8, 2011
1 parent d6652ef commit 06d07b6
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions sound/soc/omap/omap-dmic.c
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,6 @@ static int omap_dmic_dai_startup(struct snd_pcm_substream *substream,
mutex_lock(&dmic->mutex);

if (!dai->active) {
pm_runtime_get_sync(dmic->dev);
snd_pcm_hw_constraint_msbits(substream->runtime, 0, 32, 24);
dmic->active = 1;
} else {
Expand All @@ -133,10 +132,8 @@ static void omap_dmic_dai_shutdown(struct snd_pcm_substream *substream,

mutex_lock(&dmic->mutex);

if (!dai->active) {
pm_runtime_put_sync(dmic->dev);
if (!dai->active)
dmic->active = 0;
}

mutex_unlock(&dmic->mutex);
}
Expand Down

0 comments on commit 06d07b6

Please sign in to comment.