ALSA: memalloc: Use proper SG helpers for noncontig allocations
authorTakashi Iwai <tiwai@suse.de>
Mon, 8 Nov 2021 15:10:59 +0000 (16:10 +0100)
committerTakashi Iwai <tiwai@suse.de>
Tue, 9 Nov 2021 06:14:22 +0000 (07:14 +0100)
commitad4f93ca41388f36ec40ec9c1d97b52177f25fa3
treeddbd7b8878f2693f3aef588f817ce29c46895f3f
parent43d35ccc36dad52377dd349b2e3ea803b72c3906
ALSA: memalloc: Use proper SG helpers for noncontig allocations

The recently introduced non-contiguous page allocation support helpers
are using the simplified code to calculate the page and DMA address
based on the vmalloc helpers, but this isn't quite right as the vmap
is valid only for the direct DMA.

This patch corrects those accessors to use the proper SG helpers
instead.

Fixes: a25684a95646 ("ALSA: memalloc: Support for non-contiguous page allocation")
Tested-by: Alex Xu (Hello71) <alex_y_xu@yahoo.ca>
Link: https://lore.kernel.org/r/20211108151059.31898-1-tiwai@suse.de
Signed-off-by: Takashi Iwai <tiwai@suse.de>
sound/core/memalloc.c