]> git.baikalelectronics.ru Git - kernel.git/commit
ALSA: usb-audio: Fix PCM buffer allocation in non-vmalloc mode
authorTakashi Iwai <tiwai@suse.de>
Fri, 5 Feb 2021 14:45:59 +0000 (15:45 +0100)
committerTakashi Iwai <tiwai@suse.de>
Fri, 5 Feb 2021 16:02:11 +0000 (17:02 +0100)
commit98da95527c27dab9f9fc0ba04a36839cbedab543
tree3623e39e381fb5c1ac40923dca7fa973e65c217e
parent476d9b1e6b5d14e2fd0bfa1c7634b36896821f35
ALSA: usb-audio: Fix PCM buffer allocation in non-vmalloc mode

The commit 44b423667610 ("ALSA: usb-audio: Allow non-vmalloc buffer
for PCM buffers") introduced the mode to allocate coherent pages for
PCM buffers, and it used bus->controller device as its DMA device.
It turned out, however, that bus->sysdev is a more appropriate device
to be used for DMA mapping in HCD code.

This patch corrects the device reference accordingly.

Note that, on most platforms, both point to the very same device,
hence this patch doesn't change anything practically.  But on
platforms like xhcd-plat hcd, the change becomes effective.

Fixes: 44b423667610 ("ALSA: usb-audio: Allow non-vmalloc buffer for PCM buffers")
Cc: <stable@vger.kernel.org>
Link: https://lore.kernel.org/r/20210205144559.29555-1-tiwai@suse.de
Signed-off-by: Takashi Iwai <tiwai@suse.de>
sound/usb/pcm.c