From: Mika Westerberg Date: Tue, 18 Jun 2013 14:29:44 +0000 (+0300) Subject: spi/pxa2xx: use GFP_ATOMIC in sg table allocation X-Git-Tag: accepted/tizen/common/20141203.182822~1946^2~23^2~1 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=5548f98c46538d1da04eff179a52e50537d11465;p=platform%2Fkernel%2Flinux-arm64.git spi/pxa2xx: use GFP_ATOMIC in sg table allocation pxa2xx_spi_map_dma_buffer() gets called in tasklet context so we can't sleep when we allocate a new sg table. Use GFP_ATOMIC here instead. Signed-off-by: Mika Westerberg Signed-off-by: Mark Brown Cc: stable@vger.kernel.org --- diff --git a/drivers/spi/spi-pxa2xx-dma.c b/drivers/spi/spi-pxa2xx-dma.c index c735c5a..6427600 100644 --- a/drivers/spi/spi-pxa2xx-dma.c +++ b/drivers/spi/spi-pxa2xx-dma.c @@ -59,7 +59,7 @@ static int pxa2xx_spi_map_dma_buffer(struct driver_data *drv_data, int ret; sg_free_table(sgt); - ret = sg_alloc_table(sgt, nents, GFP_KERNEL); + ret = sg_alloc_table(sgt, nents, GFP_ATOMIC); if (ret) return ret; }