summaryrefslogtreecommitdiff
path: root/sound/soc/tegra/tegra_spdif.c
diff options
context:
space:
mode:
authorStephen Warren <swarren@nvidia.com>2012-03-30 17:07:16 -0600
committerMark Brown <broonie@opensource.wolfsonmicro.com>2012-04-01 11:28:32 +0100
commit30d436a64415e6d01b8696d6288abe7ad0b383b5 (patch)
treeb896be7dc848ea5745c16ee216f348417ab20e06 /sound/soc/tegra/tegra_spdif.c
parentc0d5a47ca86047aca1616b744ab3ef31b3448994 (diff)
ASoC: tegra: remove open-coded clk reference counting
clk_enable/disable() already reference count the enable calls, so there's no need for the callers to do the same. Signed-off-by: Stephen Warren <swarren@nvidia.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Diffstat (limited to 'sound/soc/tegra/tegra_spdif.c')
-rw-r--r--sound/soc/tegra/tegra_spdif.c8
1 files changed, 2 insertions, 6 deletions
diff --git a/sound/soc/tegra/tegra_spdif.c b/sound/soc/tegra/tegra_spdif.c
index cd836cbcb0c9..3426633e9147 100644
--- a/sound/soc/tegra/tegra_spdif.c
+++ b/sound/soc/tegra/tegra_spdif.c
@@ -196,18 +196,14 @@ static int tegra_spdif_trigger(struct snd_pcm_substream *substream, int cmd,
case SNDRV_PCM_TRIGGER_START:
case SNDRV_PCM_TRIGGER_PAUSE_RELEASE:
case SNDRV_PCM_TRIGGER_RESUME:
- if (!spdif->clk_refs)
- clk_enable(spdif->clk_spdif_out);
- spdif->clk_refs++;
+ clk_enable(spdif->clk_spdif_out);
tegra_spdif_start_playback(spdif);
break;
case SNDRV_PCM_TRIGGER_STOP:
case SNDRV_PCM_TRIGGER_PAUSE_PUSH:
case SNDRV_PCM_TRIGGER_SUSPEND:
tegra_spdif_stop_playback(spdif);
- spdif->clk_refs--;
- if (!spdif->clk_refs)
- clk_disable(spdif->clk_spdif_out);
+ clk_disable(spdif->clk_spdif_out);
break;
default:
return -EINVAL;