mirror of
git://git.kernel.org/pub/scm/linux/kernel/git/xiang/erofs.git
synced 2026-10-31 06:14:39 +01:00
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 <[email protected]> Signed-off-by: Pierre-Louis Bossart <[email protected]> Reviewed-by: Takashi Iwai <[email protected]> Signed-off-by: Mark Brown <[email protected]>
This commit is contained in:
1 parent
ce397d215c
commit
4cae99d9b5
1 file changed
+8
-8
@@ -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
|
||||
@@ -90,14 +98,6 @@ struct snd_sg_buf {
|
||||
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
|
||||
*/
|
||||
|
||||
Reference in new issue
Block a user