diff options
Diffstat (limited to 'include/sound')
-rw-r--r-- | include/sound/memalloc.h | 4 | ||||
-rw-r--r-- | include/sound/pcm.h | 3 |
2 files changed, 5 insertions, 2 deletions
diff --git a/include/sound/memalloc.h b/include/sound/memalloc.h index 96d0dc171459..d787a6b4a101 100644 --- a/include/sound/memalloc.h +++ b/include/sound/memalloc.h | |||
@@ -97,7 +97,9 @@ static inline unsigned int snd_sgbuf_aligned_pages(size_t size) | |||
97 | */ | 97 | */ |
98 | static inline dma_addr_t snd_sgbuf_get_addr(struct snd_sg_buf *sgbuf, size_t offset) | 98 | static inline dma_addr_t snd_sgbuf_get_addr(struct snd_sg_buf *sgbuf, size_t offset) |
99 | { | 99 | { |
100 | return sgbuf->table[offset >> PAGE_SHIFT].addr + offset % PAGE_SIZE; | 100 | dma_addr_t addr = sgbuf->table[offset >> PAGE_SHIFT].addr; |
101 | addr &= PAGE_MASK; | ||
102 | return addr + offset % PAGE_SIZE; | ||
101 | } | 103 | } |
102 | 104 | ||
103 | /* | 105 | /* |
diff --git a/include/sound/pcm.h b/include/sound/pcm.h index 8db89630c821..40c5a6fa6bcd 100644 --- a/include/sound/pcm.h +++ b/include/sound/pcm.h | |||
@@ -996,7 +996,8 @@ snd_pcm_sgbuf_get_ptr(struct snd_pcm_substream *substream, unsigned int ofs) | |||
996 | 996 | ||
997 | struct page *snd_pcm_sgbuf_ops_page(struct snd_pcm_substream *substream, | 997 | struct page *snd_pcm_sgbuf_ops_page(struct snd_pcm_substream *substream, |
998 | unsigned long offset); | 998 | unsigned long offset); |
999 | 999 | unsigned int snd_pcm_sgbuf_get_chunk_size(struct snd_pcm_substream *substream, | |
1000 | unsigned int ofs, unsigned int size); | ||
1000 | 1001 | ||
1001 | /* handle mmap counter - PCM mmap callback should handle this counter properly */ | 1002 | /* handle mmap counter - PCM mmap callback should handle this counter properly */ |
1002 | static inline void snd_pcm_mmap_data_open(struct vm_area_struct *area) | 1003 | static inline void snd_pcm_mmap_data_open(struct vm_area_struct *area) |