]> git.kernelconcepts.de Git - karo-tx-linux.git/commitdiff
dmaengine: hsu: move memory allocation to GFP_NOWAIT
authorAndy Shevchenko <andriy.shevchenko@linux.intel.com>
Mon, 16 Mar 2015 08:53:58 +0000 (10:53 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 26 Mar 2015 22:02:49 +0000 (23:02 +0100)
The GFP_ATOMIC is too strict, and DMAEngine documentation make an advice to use
GFP_NOWAIT. This patch does the conversion.

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Acked-by: Vinod Koul <vinod.koul@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/dma/hsu/hsu.c

index e649b62431e243104e933e456df27e3ac20311d4..9b84def7a35373a45cf18efc9d53939bcc86baf0 100644 (file)
@@ -198,11 +198,11 @@ static struct hsu_dma_desc *hsu_dma_alloc_desc(unsigned int nents)
 {
        struct hsu_dma_desc *desc;
 
-       desc = kzalloc(sizeof(*desc), GFP_ATOMIC);
+       desc = kzalloc(sizeof(*desc), GFP_NOWAIT);
        if (!desc)
                return NULL;
 
-       desc->sg = kcalloc(nents, sizeof(*desc->sg), GFP_ATOMIC);
+       desc->sg = kcalloc(nents, sizeof(*desc->sg), GFP_NOWAIT);
        if (!desc->sg) {
                kfree(desc);
                return NULL;