summaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorViresh Kumar <viresh.kumar@st.com>2011-08-10 14:20:55 +0530
committerLinus WALLEIJ <linus.walleij@stericsson.com>2011-10-17 15:19:29 +0200
commit9bfb020a15f4bdc2bc095761ca66cc148a6829ed (patch)
tree62499f2b997ce5688bcf9b8bd5a4da87c4129fee /drivers
parent02722f385605b53882c425bc0978c519913bfd17 (diff)
spi/spi-pl022: Use GFP_ATOMIC for allocation from tasklet
tasklets don't allow invocation to sleeping routines. In configure_dma() routine, sg_alloc_table() was called with GFP_KERNEL flag and so this causes crash when called from tasklet. Replace GFP_KERNEL with GFP_ATOMIC to get this fixed. Signed-off-by: Viresh Kumar <viresh.kumar@st.com> Tested-by: Linus Walleij <linus.walleij@linaro.org> Signed-off-by: Grant Likely <grant.likely@secretlab.ca> Change-Id: I15b94ca35abbd099712cb0789e1f196a762b5095 Reviewed-on: http://gerrit.lud.stericsson.com/gerrit/34212 Reviewed-by: Linus WALLEIJ <linus.walleij@stericsson.com> Tested-by: Linus WALLEIJ <linus.walleij@stericsson.com>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/spi/spi-pl022.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/spi/spi-pl022.c b/drivers/spi/spi-pl022.c
index 6209540e06a..01e9aa45ea8 100644
--- a/drivers/spi/spi-pl022.c
+++ b/drivers/spi/spi-pl022.c
@@ -1019,11 +1019,11 @@ static int configure_dma(struct pl022 *pl022)
pages = (pl022->cur_transfer->len >> PAGE_SHIFT) + 1;
dev_dbg(&pl022->adev->dev, "using %d pages for transfer\n", pages);
- ret = sg_alloc_table(&pl022->sgt_rx, pages, GFP_KERNEL);
+ ret = sg_alloc_table(&pl022->sgt_rx, pages, GFP_ATOMIC);
if (ret)
goto err_alloc_rx_sg;
- ret = sg_alloc_table(&pl022->sgt_tx, pages, GFP_KERNEL);
+ ret = sg_alloc_table(&pl022->sgt_tx, pages, GFP_ATOMIC);
if (ret)
goto err_alloc_tx_sg;