summaryrefslogtreecommitdiffstats
path: root/include/sound
diff options
context:
space:
mode:
authorMark Brown <broonie@kernel.org>2018-07-26 17:08:39 +0100
committerMark Brown <broonie@kernel.org>2018-07-26 17:08:39 +0100
commitfd56361177a3c10133c272eb130e3c11f0bcd9a9 (patch)
treeca430baef83c3b3dbe4d166b9eecc3d774028438 /include/sound
parent3ba66feb59810e2ce616da0c4f1a5230c74768a8 (diff)
parent4cae99d9b5305ab8cccc839fccceb81ec9e5abda (diff)
downloadop-kernel-dev-fd56361177a3c10133c272eb130e3c11f0bcd9a9.zip
op-kernel-dev-fd56361177a3c10133c272eb130e3c11f0bcd9a9.tar.gz
Merge tag 'alsa-add-snd-sgbuf-aligned-pages' of https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into asoc-4.19
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.
Diffstat (limited to 'include/sound')
-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 9c3db3d..c669900 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,
OpenPOWER on IntegriCloud