summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorPierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>2018-07-25 22:15:56 +0200
committerMark Brown <broonie@kernel.org>2018-07-26 18:05:29 +0200
commit4cae99d9b5305ab8cccc839fccceb81ec9e5abda (patch)
treef4ea0e8bed960d9469085fa97df2630240310034 /include
parentLinux 4.18-rc1 (diff)
downloadlinux-4cae99d9b5305ab8cccc839fccceb81ec9e5abda.tar.xz
linux-4cae99d9b5305ab8cccc839fccceb81ec9e5abda.zip
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: kbuild test robot <lkp@intel.com> Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Reviewed-by: Takashi Iwai <tiwai@suse.de> Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'include')
-rw-r--r--include/sound/memalloc.h16
1 files changed, 8 insertions, 8 deletions
diff --git a/include/sound/memalloc.h b/include/sound/memalloc.h
index 9c3db3dce32b..c669900e6cbe 100644
--- a/include/sound/memalloc.h
+++ b/include/sound/memalloc.h
@@ -67,6 +67,14 @@ struct snd_dma_buffer {
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
/*
* Scatter-Gather generic device pages
@@ -91,14 +99,6 @@ struct snd_sg_buf {
};
/*
- * 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
*/
static inline dma_addr_t snd_sgbuf_get_addr(struct snd_dma_buffer *dmab,