diff options
author | Takashi Iwai <tiwai@suse.de> | 2021-08-02 09:28:02 +0200 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2021-08-04 08:07:58 +0200 |
commit | 58a95dfa4fdd9c72e62be34dd025d268c1e04a83 (patch) | |
tree | ba741736316afd5361d67790bd042ccb2c960d2a /sound/core/sgbuf.c | |
parent | 723c1252e058dc854f9d031e3e6526ca62f9f5c7 (diff) |
ALSA: memalloc: Correctly name as WC
SNDRV_DMA_TYPE_DEV_UC and SNDRV_DMA_TYPE_DEV_UC_SG are incorrectly
named as if they were for the uncached memory, while actually we set
the pages as write-combined. Rename them to reflect the right
attribute.
Acked-by: Mark Brown <broonie@kernel.org>
Link: https://lore.kernel.org/r/20210802072815.13551-3-tiwai@suse.de
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/core/sgbuf.c')
-rw-r--r-- | sound/core/sgbuf.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/sound/core/sgbuf.c b/sound/core/sgbuf.c index a46129f3de12..9666a95f5a5c 100644 --- a/sound/core/sgbuf.c +++ b/sound/core/sgbuf.c @@ -43,8 +43,8 @@ static void snd_dma_sg_free(struct snd_dma_buffer *dmab) dmab->area = NULL; tmpb.dev.type = SNDRV_DMA_TYPE_DEV; - if (dmab->dev.type == SNDRV_DMA_TYPE_DEV_UC_SG) - tmpb.dev.type = SNDRV_DMA_TYPE_DEV_UC; + if (dmab->dev.type == SNDRV_DMA_TYPE_DEV_WC_SG) + tmpb.dev.type = SNDRV_DMA_TYPE_DEV_WC; tmpb.dev.dev = sgbuf->dev; for (i = 0; i < sgbuf->pages; i++) { if (!(sgbuf->table[i].addr & ~PAGE_MASK)) @@ -77,8 +77,8 @@ static void *snd_dma_sg_alloc(struct snd_dma_buffer *dmab, size_t size) dmab->private_data = sgbuf = kzalloc(sizeof(*sgbuf), GFP_KERNEL); if (!sgbuf) return NULL; - if (dmab->dev.type == SNDRV_DMA_TYPE_DEV_UC_SG) { - type = SNDRV_DMA_TYPE_DEV_UC; + if (dmab->dev.type == SNDRV_DMA_TYPE_DEV_WC_SG) { + type = SNDRV_DMA_TYPE_DEV_WC; #ifdef pgprot_noncached prot = pgprot_noncached(PAGE_KERNEL); #endif |