From cebc239dda935340c147fc59e7ab0d98dffdd9f8 Mon Sep 17 00:00:00 2001 From: Greg Kroah-Hartman Date: Thu, 31 Aug 2023 13:44:35 +0000 Subject: [PATCH] Revert "ALSA: pcm: Fix build error on m68k and others" This reverts commit 52a7c86e63d22aea3057542c3b2d9ff262472af6 which is commit 467fd0e82b6265b8e6cc078a70bd7592574d5c83 upstream. It breaks the Android abi. If it is required in the future, it can come back in an abi-safe way. Bug: 161946584 Change-Id: I0ce09586d61744bc184f602a84a4cfd0565641b3 Signed-off-by: Greg Kroah-Hartman --- sound/core/pcm_memory.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/sound/core/pcm_memory.c b/sound/core/pcm_memory.c index 22055bb2eba2..beca39f7c8f3 100644 --- a/sound/core/pcm_memory.c +++ b/sound/core/pcm_memory.c @@ -66,9 +66,8 @@ static int do_alloc_pages(struct snd_card *card, int type, struct device *dev, __update_allocated_size(card, size); mutex_unlock(&card->memory_mutex); - -#ifdef CONFIG_SND_DMA_SGBUF - if ((type == SNDRV_DMA_TYPE_DEV_SG || type == SNDRV_DMA_TYPE_DEV_UC_SG) && + if (IS_ENABLED(CONFIG_SND_DMA_SGBUF) && + (type == SNDRV_DMA_TYPE_DEV_SG || type == SNDRV_DMA_TYPE_DEV_UC_SG) && !dma_is_direct(get_dma_ops(dev))) { /* mutate to continuous page allocation */ dev_dbg(dev, "Use continuous page allocator\n"); @@ -77,7 +76,6 @@ static int do_alloc_pages(struct snd_card *card, int type, struct device *dev, else type = SNDRV_DMA_TYPE_DEV_UC; } -#endif /* CONFIG_SND_DMA_SGBUF */ err = snd_dma_alloc_pages(type, dev, size, dmab); if (!err) {