diff options
author | Laxminath Kasam <lkasam@codeaurora.org> | 2016-02-22 12:21:54 +0530 |
---|---|---|
committer | David Keitel <dkeitel@codeaurora.org> | 2016-03-23 21:21:13 -0700 |
commit | d992ed3e3617ad69097e62ed6ff58ed80c14b2f2 (patch) | |
tree | 08e467c165abb34c2661af0d081bbb3b182f2e91 /sound/soc/msm | |
parent | 249d0bd7a2f0fae52957741c8e6d23e35a57afb8 (diff) |
ASoC: msm: qdsp6v2: Move spin lock init before apr registration
Move spin lock init for no wait que before apr registration.
If apr registration fails asm free client will free
the no wait que by acquiring spin lock. Hence spin lock
init for no wait que should happen before apr registration.
CRs-Fixed: 979701
Change-Id: I5ef85e39ab5e3babfb2e097005c0d1553cc38f51
Signed-off-by: Laxminath Kasam <lkasam@codeaurora.org>
Diffstat (limited to 'sound/soc/msm')
-rw-r--r-- | sound/soc/msm/qdsp6v2/q6asm.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/sound/soc/msm/qdsp6v2/q6asm.c b/sound/soc/msm/qdsp6v2/q6asm.c index 246fd17472f4..7af684ea30b2 100644 --- a/sound/soc/msm/qdsp6v2/q6asm.c +++ b/sound/soc/msm/qdsp6v2/q6asm.c @@ -1079,6 +1079,7 @@ struct audio_client *q6asm_audio_client_alloc(app_cb cb, void *priv) /* DSP expects stream id from 1 */ ac->stream_id = 1; INIT_LIST_HEAD(&ac->no_wait_que); + spin_lock_init(&ac->no_wait_que_spinlock); ac->apr = apr_register("ADSP", "ASM", \ (apr_fn)q6asm_callback,\ ((ac->session) << 8 | 0x0001),\ @@ -1124,7 +1125,6 @@ struct audio_client *q6asm_audio_client_alloc(app_cb cb, void *priv) } atomic_set(&ac->cmd_state, 0); atomic_set(&ac->nowait_cmd_cnt, 0); - spin_lock_init(&ac->no_wait_que_spinlock); atomic_set(&ac->mem_state, 0); rc = send_asm_custom_topology(ac); |