spi/pxa2xx: use GFP_ATOMIC in sg table allocation
authorMika Westerberg <[email protected]>
Tue, 18 Jun 2013 14:29:44 +0000 (17:29 +0300)
committerMark Brown <[email protected]>
Tue, 18 Jun 2013 18:11:04 +0000 (19:11 +0100)
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 <[email protected]>
Signed-off-by: Mark Brown <[email protected]>
Cc: [email protected]
drivers/spi/spi-pxa2xx-dma.c

index c735c5a008a2a180669cb1ece71fa8ccfb112cdf..6427600b5bbe66c5d66fbcf967a1b20a008162da 100644 (file)
@@ -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;
        }