aboutsummaryrefslogtreecommitdiffstats
path: root/sound
diff options
context:
space:
mode:
authorEero Nurkkala <ext-eero.nurkkala@nokia.com>2009-02-02 14:20:46 +0200
committerMark Brown <broonie@opensource.wolfsonmicro.com>2009-02-02 12:41:25 +0000
commit21dff4345697ad129b0efeed1b4d0aa53dfd47fe (patch)
tree1d2d5e6ce98811314cf06f1ae3d416a0224b55c1 /sound
parentef390c0b6e3f4d2d2d43f53f4bd35e1884571a14 (diff)
downloadkernel_samsung_crespo-21dff4345697ad129b0efeed1b4d0aa53dfd47fe.zip
kernel_samsung_crespo-21dff4345697ad129b0efeed1b4d0aa53dfd47fe.tar.gz
kernel_samsung_crespo-21dff4345697ad129b0efeed1b4d0aa53dfd47fe.tar.bz2
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>
Diffstat (limited to 'sound')
-rw-r--r--sound/soc/omap/omap-pcm.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/sound/soc/omap/omap-pcm.c b/sound/soc/omap/omap-pcm.c
index b0362df..dd3bb29 100644
--- a/sound/soc/omap/omap-pcm.c
+++ b/sound/soc/omap/omap-pcm.c
@@ -175,9 +175,10 @@ static int omap_pcm_trigger(struct snd_pcm_substream *substream, int cmd)
{
struct snd_pcm_runtime *runtime = substream->runtime;
struct omap_runtime_data *prtd = runtime->private_data;
+ unsigned long flags;
int ret = 0;
- spin_lock_irq(&prtd->lock);
+ spin_lock_irqsave(&prtd->lock, flags);
switch (cmd) {
case SNDRV_PCM_TRIGGER_START:
case SNDRV_PCM_TRIGGER_RESUME:
@@ -195,7 +196,7 @@ static int omap_pcm_trigger(struct snd_pcm_substream *substream, int cmd)
default:
ret = -EINVAL;
}
- spin_unlock_irq(&prtd->lock);
+ spin_unlock_irqrestore(&prtd->lock, flags);
return ret;
}