OMAP: ASoC: Fix spinlock misuse in omap-pcm.c

omap_pcm_trigger is called also in interrupt context so CPU flags must
be restored when returning.

Signed-off-by: Eero Nurkkala <ext-eero.nurkkala@nokia.com>
Acked-by: Jarkko Nikula <jarkko.nikula@nokia.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>

authored by Eero Nurkkala and committed by Mark Brown 21dff434 ef390c0b

+3 -2
+3 -2
sound/soc/omap/omap-pcm.c
··· 175 175 { 176 176 struct snd_pcm_runtime *runtime = substream->runtime; 177 177 struct omap_runtime_data *prtd = runtime->private_data; 178 + unsigned long flags; 178 179 int ret = 0; 179 180 180 - spin_lock_irq(&prtd->lock); 181 + spin_lock_irqsave(&prtd->lock, flags); 181 182 switch (cmd) { 182 183 case SNDRV_PCM_TRIGGER_START: 183 184 case SNDRV_PCM_TRIGGER_RESUME: ··· 196 195 default: 197 196 ret = -EINVAL; 198 197 } 199 - spin_unlock_irq(&prtd->lock); 198 + spin_unlock_irqrestore(&prtd->lock, flags); 200 199 201 200 return ret; 202 201 }