aboutsummaryrefslogtreecommitdiffstats
path: root/sound/soc/mid-x86
diff options
context:
space:
mode:
authorLu Guanqun <guanqun.lu@intel.com>2011-04-08 15:38:48 +0800
committerMark Brown <broonie@opensource.wolfsonmicro.com>2011-04-11 13:14:51 -0700
commitd89b0a136e61c2d7d37a8040269a2ae169345c7a (patch)
tree8964aa1701dc14c3824e6c3d3b35a26c723b046e /sound/soc/mid-x86
parentd985f27e13fe62e158a3416e3d8308ef1cf6028c (diff)
downloadkernel_samsung_aries-d89b0a136e61c2d7d37a8040269a2ae169345c7a.zip
kernel_samsung_aries-d89b0a136e61c2d7d37a8040269a2ae169345c7a.tar.gz
kernel_samsung_aries-d89b0a136e61c2d7d37a8040269a2ae169345c7a.tar.bz2
ASoC: sst_platform: Fix lock acquring
Fix the possible dead lock shown below: spin_lock sst_get_stream_status sst_period_elapsed intel_sst_interrupt handle_IRQ_event handle_fasteoi_irq do_IRQ common_interrupt spin_lock sst_set_stream_status sst_platform_pcm_trigger Signed-off-by: Lu Guanqun <guanqun.lu@intel.com> Acked-by: Liam Girdwood <lrg@ti.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Diffstat (limited to 'sound/soc/mid-x86')
-rw-r--r--sound/soc/mid-x86/sst_platform.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/sound/soc/mid-x86/sst_platform.c b/sound/soc/mid-x86/sst_platform.c
index ee2c224..9ebe027 100644
--- a/sound/soc/mid-x86/sst_platform.c
+++ b/sound/soc/mid-x86/sst_platform.c
@@ -116,18 +116,20 @@ struct snd_soc_dai_driver sst_platform_dai[] = {
static inline void sst_set_stream_status(struct sst_runtime_stream *stream,
int state)
{
- spin_lock(&stream->status_lock);
+ unsigned long flags;
+ spin_lock_irqsave(&stream->status_lock, flags);
stream->stream_status = state;
- spin_unlock(&stream->status_lock);
+ spin_unlock_irqrestore(&stream->status_lock, flags);
}
static inline int sst_get_stream_status(struct sst_runtime_stream *stream)
{
int state;
+ unsigned long flags;
- spin_lock(&stream->status_lock);
+ spin_lock_irqsave(&stream->status_lock, flags);
state = stream->stream_status;
- spin_unlock(&stream->status_lock);
+ spin_unlock_irqrestore(&stream->status_lock, flags);
return state;
}