diff options
author | Eero Nurkkala <ext-eero.nurkkala@nokia.com> | 2009-02-02 07:20:46 -0500 |
---|---|---|
committer | Mark Brown <broonie@opensource.wolfsonmicro.com> | 2009-02-02 07:41:25 -0500 |
commit | 21dff4345697ad129b0efeed1b4d0aa53dfd47fe (patch) | |
tree | 1d2d5e6ce98811314cf06f1ae3d416a0224b55c1 /sound/soc | |
parent | ef390c0b6e3f4d2d2d43f53f4bd35e1884571a14 (diff) |
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/soc')
-rw-r--r-- | sound/soc/omap/omap-pcm.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/sound/soc/omap/omap-pcm.c b/sound/soc/omap/omap-pcm.c index b0362dfd5b71..dd3bb2933762 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) | |||
175 | { | 175 | { |
176 | struct snd_pcm_runtime *runtime = substream->runtime; | 176 | struct snd_pcm_runtime *runtime = substream->runtime; |
177 | struct omap_runtime_data *prtd = runtime->private_data; | 177 | struct omap_runtime_data *prtd = runtime->private_data; |
178 | unsigned long flags; | ||
178 | int ret = 0; | 179 | int ret = 0; |
179 | 180 | ||
180 | spin_lock_irq(&prtd->lock); | 181 | spin_lock_irqsave(&prtd->lock, flags); |
181 | switch (cmd) { | 182 | switch (cmd) { |
182 | case SNDRV_PCM_TRIGGER_START: | 183 | case SNDRV_PCM_TRIGGER_START: |
183 | case SNDRV_PCM_TRIGGER_RESUME: | 184 | case SNDRV_PCM_TRIGGER_RESUME: |
@@ -195,7 +196,7 @@ static int omap_pcm_trigger(struct snd_pcm_substream *substream, int cmd) | |||
195 | default: | 196 | default: |
196 | ret = -EINVAL; | 197 | ret = -EINVAL; |
197 | } | 198 | } |
198 | spin_unlock_irq(&prtd->lock); | 199 | spin_unlock_irqrestore(&prtd->lock, flags); |
199 | 200 | ||
200 | return ret; | 201 | return ret; |
201 | } | 202 | } |