X-Git-Url: https://git.openpandora.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=include%2Fsound%2Fmemalloc.h;h=ab240bb608a877fed48f4d095986619a022930d0;hb=53fd7f912c0877647d6a1e1877f5ea8535ee0b4a;hp=c42506212649938d73c3cf611e3325ed95af7e4e;hpb=4b3df5668c8ebaebd8d66a5a94374be3e3b2ef0c;p=pandora-kernel.git diff --git a/include/sound/memalloc.h b/include/sound/memalloc.h index c42506212649..ab240bb608a8 100644 --- a/include/sound/memalloc.h +++ b/include/sound/memalloc.h @@ -101,7 +101,7 @@ static inline unsigned int snd_sgbuf_aligned_pages(size_t size) static inline dma_addr_t snd_sgbuf_get_addr(struct snd_sg_buf *sgbuf, size_t offset) { dma_addr_t addr = sgbuf->table[offset >> PAGE_SHIFT].addr; - addr &= PAGE_MASK; + addr &= ~((dma_addr_t)PAGE_SIZE - 1); return addr + offset % PAGE_SIZE; }