aboutsummaryrefslogtreecommitdiffstats
path: root/include/sound/ak4113.h
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2015-01-16 07:03:28 -0500
committerTakashi Iwai <tiwai@suse.de>2015-01-28 16:30:18 -0500
commit1781e78c63317c04e6ae6a076acfd53236f420bc (patch)
treeb8358b38b7a3eba0da92bbce316d2bcb01e84900 /include/sound/ak4113.h
parent1293617cddc40971917150e3f5bf66b7306e2e7e (diff)
ALSA: ak411x: Fix race of reinit() calls
Protect the call with a mutex, as this may be called in parallel (either from the PCM rate change and the clock change). Acked-by: Jaroslav Kysela <perex@perex.cz> Tested-by: Pavel Hofman <pavel.hofman@ivitera.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'include/sound/ak4113.h')
-rw-r--r--include/sound/ak4113.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/include/sound/ak4113.h b/include/sound/ak4113.h
index f4fbf6888e78..58c145620c3c 100644
--- a/include/sound/ak4113.h
+++ b/include/sound/ak4113.h
@@ -287,6 +287,7 @@ struct ak4113 {
287 ak4113_read_t *read; 287 ak4113_read_t *read;
288 void *private_data; 288 void *private_data;
289 atomic_t wq_processing; 289 atomic_t wq_processing;
290 struct mutex reinit_mutex;
290 spinlock_t lock; 291 spinlock_t lock;
291 unsigned char regmap[AK4113_WRITABLE_REGS]; 292 unsigned char regmap[AK4113_WRITABLE_REGS];
292 struct snd_kcontrol *kctls[AK4113_CONTROLS]; 293 struct snd_kcontrol *kctls[AK4113_CONTROLS];