diff options
Diffstat (limited to 'include/sound/memalloc.h')
| -rw-r--r-- | include/sound/memalloc.h | 18 | 
1 files changed, 10 insertions, 8 deletions
diff --git a/include/sound/memalloc.h b/include/sound/memalloc.h index 9c3db3dce32b..67561b997915 100644 --- a/include/sound/memalloc.h +++ b/include/sound/memalloc.h @@ -24,6 +24,8 @@  #ifndef __SOUND_MEMALLOC_H  #define __SOUND_MEMALLOC_H +#include <asm/page.h> +  struct device;  /* @@ -67,6 +69,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 +101,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,  |