aboutsummaryrefslogtreecommitdiffstats
path: root/sound/soc/pxa/pxa-ssp.c
diff options
context:
space:
mode:
Diffstat (limited to 'sound/soc/pxa/pxa-ssp.c')
-rw-r--r--sound/soc/pxa/pxa-ssp.c12
1 files changed, 7 insertions, 5 deletions
diff --git a/sound/soc/pxa/pxa-ssp.c b/sound/soc/pxa/pxa-ssp.c
index 3bd7712f029b..e69397f40f72 100644
--- a/sound/soc/pxa/pxa-ssp.c
+++ b/sound/soc/pxa/pxa-ssp.c
@@ -135,10 +135,11 @@ static int pxa_ssp_suspend(struct snd_soc_dai *cpu_dai)
135 struct ssp_priv *priv = cpu_dai->private_data; 135 struct ssp_priv *priv = cpu_dai->private_data;
136 136
137 if (!cpu_dai->active) 137 if (!cpu_dai->active)
138 return 0; 138 clk_enable(priv->dev.ssp->clk);
139 139
140 ssp_save_state(&priv->dev, &priv->state); 140 ssp_save_state(&priv->dev, &priv->state);
141 clk_disable(priv->dev.ssp->clk); 141 clk_disable(priv->dev.ssp->clk);
142
142 return 0; 143 return 0;
143} 144}
144 145
@@ -146,12 +147,13 @@ static int pxa_ssp_resume(struct snd_soc_dai *cpu_dai)
146{ 147{
147 struct ssp_priv *priv = cpu_dai->private_data; 148 struct ssp_priv *priv = cpu_dai->private_data;
148 149
149 if (!cpu_dai->active)
150 return 0;
151
152 clk_enable(priv->dev.ssp->clk); 150 clk_enable(priv->dev.ssp->clk);
153 ssp_restore_state(&priv->dev, &priv->state); 151 ssp_restore_state(&priv->dev, &priv->state);
154 ssp_enable(&priv->dev); 152
153 if (cpu_dai->active)
154 ssp_enable(&priv->dev);
155 else
156 clk_disable(priv->dev.ssp->clk);
155 157
156 return 0; 158 return 0;
157} 159}