Archived
14
0
Fork 0

ASoC: Use core pm_runtime callbacks for omap-dmic

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>
This commit is contained in:
Mark Brown 2011-12-03 20:20:02 +00:00
parent d6652ef822
commit 06d07b6b1c

View file

@ -114,7 +114,6 @@ static int omap_dmic_dai_startup(struct snd_pcm_substream *substream,
mutex_lock(&dmic->mutex); mutex_lock(&dmic->mutex);
if (!dai->active) { if (!dai->active) {
pm_runtime_get_sync(dmic->dev);
snd_pcm_hw_constraint_msbits(substream->runtime, 0, 32, 24); snd_pcm_hw_constraint_msbits(substream->runtime, 0, 32, 24);
dmic->active = 1; dmic->active = 1;
} else { } else {
@ -133,10 +132,8 @@ static void omap_dmic_dai_shutdown(struct snd_pcm_substream *substream,
mutex_lock(&dmic->mutex); mutex_lock(&dmic->mutex);
if (!dai->active) { if (!dai->active)
pm_runtime_put_sync(dmic->dev);
dmic->active = 0; dmic->active = 0;
}
mutex_unlock(&dmic->mutex); mutex_unlock(&dmic->mutex);
} }