ALSA: usx2y: Fix shmem initialization
authorTakashi Iwai <tiwai@suse.de>
Mon, 17 May 2021 13:15:42 +0000 (15:15 +0200)
committerTakashi Iwai <tiwai@suse.de>
Mon, 17 May 2021 14:05:10 +0000 (16:05 +0200)
commit64a06f195d3b2d65141b32c80d6b7f0db4df6cb5
tree97bfb181a1a658fd4b1621dd1458d96fd03f3791
parentc1f24841683f5ce902e49d35ba84abc3e3886427
ALSA: usx2y: Fix shmem initialization

Currently us428ctls_shmem pages are allocated dynamically upon the
mmap call, but this is quite racy.  Since the shared memory itself is
mandatory for the mmap, let's allocate it at the beginning of the card
initialization.  Also, fix the initialization of the wait queue, too.

Link: https://lore.kernel.org/r/20210517131545.27252-9-tiwai@suse.de
Signed-off-by: Takashi Iwai <tiwai@suse.de>
sound/usb/usx2y/usX2Yhwdep.c
sound/usb/usx2y/usbusx2y.c