diff options
Diffstat (limited to 'sound')
-rw-r--r-- | sound/core/memalloc.c | 2 | ||||
-rw-r--r-- | sound/usb/usx2y/usx2yhwdeppcm.c | 1 |
2 files changed, 3 insertions, 0 deletions
diff --git a/sound/core/memalloc.c b/sound/core/memalloc.c index 129abab5ce9..e4b8959dd4b 100644 --- a/sound/core/memalloc.c +++ b/sound/core/memalloc.c @@ -197,6 +197,7 @@ void *snd_malloc_pages(size_t size, gfp_t gfp_flags) snd_assert(size > 0, return NULL); snd_assert(gfp_flags != 0, return NULL); + gfp_flags |= __GFP_COMP; /* compound page lets parts be mapped */ pg = get_order(size); if ((res = (void *) __get_free_pages(gfp_flags, pg)) != NULL) { mark_pages(virt_to_page(res), pg); @@ -241,6 +242,7 @@ static void *snd_malloc_dev_pages(struct device *dev, size_t size, dma_addr_t *d snd_assert(dma != NULL, return NULL); pg = get_order(size); gfp_flags = GFP_KERNEL + | __GFP_COMP /* compound page lets parts be mapped */ | __GFP_NORETRY /* don't trigger OOM-killer */ | __GFP_NOWARN; /* no stack trace print - this call is non-critical */ res = dma_alloc_coherent(dev, PAGE_SIZE << pg, dma, gfp_flags); diff --git a/sound/usb/usx2y/usx2yhwdeppcm.c b/sound/usb/usx2y/usx2yhwdeppcm.c index 0dc828ff9e9..c9136a98755 100644 --- a/sound/usb/usx2y/usx2yhwdeppcm.c +++ b/sound/usb/usx2y/usx2yhwdeppcm.c @@ -691,6 +691,7 @@ static struct page * snd_usX2Y_hwdep_pcm_vm_nopage(struct vm_area_struct *area, snd_assert((offset % PAGE_SIZE) == 0, return NOPAGE_OOM); vaddr = (char*)((usX2Ydev_t*)area->vm_private_data)->hwdep_pcm_shm + offset; page = virt_to_page(vaddr); + get_page(page); if (type) *type = VM_FAULT_MINOR; |