dmaengine: tegra-apb: Update driver to use GFP_NOWAIT
authorJon Hunter <jonathanh@nvidia.com>
Fri, 13 Nov 2015 16:39:42 +0000 (16:39 +0000)
committerVinod Koul <vinod.koul@intel.com>
Sat, 5 Dec 2015 10:43:08 +0000 (16:13 +0530)
The tegra20-apb-dma driver currently uses the flag GFP_ATOMIC when
allocating memory for structures used in conjunction with the DMA
descriptors. It is preferred that dmaengine drivers use GFP_NOWAIT
instead and so the emergency memory pool will not be used by these
drivers.

Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
Signed-off-by: Vinod Koul <vinod.koul@intel.com>
drivers/dma/tegra20-apb-dma.c

index d4cabd6931e5dc93ff39266bbfa2734265b97554..754c1f54d4fef6f5815f308ef355b1c3d2922885 100644 (file)
@@ -296,7 +296,7 @@ static struct tegra_dma_desc *tegra_dma_desc_get(
        spin_unlock_irqrestore(&tdc->lock, flags);
 
        /* Allocate DMA desc */
-       dma_desc = kzalloc(sizeof(*dma_desc), GFP_ATOMIC);
+       dma_desc = kzalloc(sizeof(*dma_desc), GFP_NOWAIT);
        if (!dma_desc) {
                dev_err(tdc2dev(tdc), "dma_desc alloc failed\n");
                return NULL;
@@ -336,7 +336,7 @@ static struct tegra_dma_sg_req *tegra_dma_sg_req_get(
        }
        spin_unlock_irqrestore(&tdc->lock, flags);
 
-       sg_req = kzalloc(sizeof(struct tegra_dma_sg_req), GFP_ATOMIC);
+       sg_req = kzalloc(sizeof(struct tegra_dma_sg_req), GFP_NOWAIT);
        if (!sg_req)
                dev_err(tdc2dev(tdc), "sg_req alloc failed\n");
        return sg_req;
This page took 0.026106 seconds and 5 git commands to generate.