dmaengine/ste_dma40: make the cyclic alloc NOWAIT
authorRobert Marklund <robert.marklund@stericsson.com>
Mon, 27 Jun 2011 09:33:24 +0000 (11:33 +0200)
committerVinod Koul <vinod.koul@intel.com>
Wed, 13 Jul 2011 22:39:10 +0000 (04:09 +0530)
This function may be initiated from IRQ context, so the allocation
must allocate NOWAIT memory.

Signed-off-by: Robert Marklund <robert.marklund@stericsson.com>
Reviewed-by: Rabin Vincent <rabin.vincent@stericsson.com>
Reviewed-by: Philippe Langlais <philippe.langlais@stericsson.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Vinod Koul <vinod.koul@intel.com>
drivers/dma/ste_dma40.c

index e1af76c57e4f5eac09aca9ae7f1bd418f9e90ecc..35b078d688d5520bacbdf39abb2906e943af3db5 100644 (file)
@@ -2112,7 +2112,7 @@ dma40_prep_dma_cyclic(struct dma_chan *chan, dma_addr_t dma_addr,
        struct scatterlist *sg;
        int i;
 
-       sg = kcalloc(periods + 1, sizeof(struct scatterlist), GFP_KERNEL);
+       sg = kcalloc(periods + 1, sizeof(struct scatterlist), GFP_NOWAIT);
        for (i = 0; i < periods; i++) {
                sg_dma_address(&sg[i]) = dma_addr;
                sg_dma_len(&sg[i]) = period_len;