X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;ds=sidebyside;f=sound%2Fcore%2Fmemalloc.c;h=344a83fd7c2e6b884cc318cad9518dfa733def8e;hb=6a77f38946aaee1cd85eeec6cf4229b204c15071;hp=cc0b6028c25c096dbc38121b5cea6ed3dd5cb4ee;hpb=87fc8d1bb10cd459024a742c6a10961fefcef18f;p=linux-2.6.git diff --git a/sound/core/memalloc.c b/sound/core/memalloc.c index cc0b6028c..344a83fd7 100644 --- a/sound/core/memalloc.c +++ b/sound/core/memalloc.c @@ -49,8 +49,7 @@ MODULE_LICENSE("GPL"); /* FIXME: so far only some PCI devices have the preallocation table */ #ifdef CONFIG_PCI static int enable[SNDRV_CARDS] = {[0 ... (SNDRV_CARDS-1)] = 1}; -static int boot_devs; -module_param_array(enable, bool, boot_devs, 0444); +module_param_array(enable, bool, NULL, 0444); MODULE_PARM_DESC(enable, "Enable cards to allocate buffers."); #endif @@ -246,9 +245,9 @@ static void *snd_malloc_dev_pages(struct device *dev, size_t size, dma_addr_t *d snd_assert(size > 0, return NULL); snd_assert(dma != NULL, return NULL); pg = get_order(size); - gfp_flags = GFP_KERNEL; - if (pg > 0) - gfp_flags |= __GFP_NOWARN; + gfp_flags = GFP_KERNEL + | __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); if (res != NULL) { #ifdef NEED_RESERVE_PAGES