mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-30 11:41:38 -04:00
ALSA: ak411x: Fix stall in work callback
When ak4114 work calls its callback and the callback invokes ak4114_reinit(), it stalls due to flush_delayed_work(). For avoiding this, control the reentrance by introducing a refcount. Also flush_delayed_work() is replaced with cancel_delayed_work_sync(). The exactly same bug is present in ak4113.c and fixed as well. Reported-by: Pavel Hofman <[email protected]> Acked-by: Jaroslav Kysela <[email protected]> Tested-by: Pavel Hofman <[email protected]> Cc: <[email protected]> Signed-off-by: Takashi Iwai <[email protected]>
This commit is contained in:
parent
0767e95bb9
commit
4161b4505f
4 changed files with 18 additions and 21 deletions
|
|
@ -286,7 +286,7 @@ struct ak4113 {
|
|||
ak4113_write_t *write;
|
||||
ak4113_read_t *read;
|
||||
void *private_data;
|
||||
unsigned int init:1;
|
||||
atomic_t wq_processing;
|
||||
spinlock_t lock;
|
||||
unsigned char regmap[AK4113_WRITABLE_REGS];
|
||||
struct snd_kcontrol *kctls[AK4113_CONTROLS];
|
||||
|
|
|
|||
|
|
@ -168,7 +168,7 @@ struct ak4114 {
|
|||
ak4114_write_t * write;
|
||||
ak4114_read_t * read;
|
||||
void * private_data;
|
||||
unsigned int init: 1;
|
||||
atomic_t wq_processing;
|
||||
spinlock_t lock;
|
||||
unsigned char regmap[6];
|
||||
unsigned char txcsb[5];
|
||||
|
|
|
|||
Loading…
Reference in a new issue