Commit 4cae99d9 authored by Pierre-Louis Bossart's avatar Pierre-Louis Bossart Committed by Mark Brown

ALSA: memalloc: declare snd_sgbuf_aligned_pages() unconditionally

Make this helper inline function available for all platforms. This
helps solve 0-day compilation issues when CONFIG_SND_DMA_SGBUF is not
defined.
Reported-by: default avatarkbuild test robot <lkp@intel.com>
Signed-off-by: default avatarPierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Reviewed-by: default avatarTakashi Iwai <tiwai@suse.de>
Signed-off-by: default avatarMark Brown <broonie@kernel.org>
parent ce397d21
...@@ -67,6 +67,14 @@ struct snd_dma_buffer { ...@@ -67,6 +67,14 @@ struct snd_dma_buffer {
void *private_data; /* private for allocator; don't touch */ void *private_data; /* private for allocator; don't touch */
}; };
/*
* return the pages matching with the given byte size
*/
static inline unsigned int snd_sgbuf_aligned_pages(size_t size)
{
return (size + PAGE_SIZE - 1) >> PAGE_SHIFT;
}
#ifdef CONFIG_SND_DMA_SGBUF #ifdef CONFIG_SND_DMA_SGBUF
/* /*
* Scatter-Gather generic device pages * Scatter-Gather generic device pages
...@@ -90,14 +98,6 @@ struct snd_sg_buf { ...@@ -90,14 +98,6 @@ struct snd_sg_buf {
struct device *dev; struct device *dev;
}; };
/*
* return the pages matching with the given byte size
*/
static inline unsigned int snd_sgbuf_aligned_pages(size_t size)
{
return (size + PAGE_SIZE - 1) >> PAGE_SHIFT;
}
/* /*
* return the physical address at the corresponding offset * return the physical address at the corresponding offset
*/ */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment