From: Fancy Fang Date: Wed, 8 Jan 2014 02:43:17 +0000 (+0800) Subject: ENGR00294115 PXP: correct the pxp_dispatch thread exit logic X-Git-Tag: KARO-TX6-2014-08-21~1^2~79 X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=750553d25bd827b4afb562253fe566212ab994f7;p=karo-tx-linux.git ENGR00294115 PXP: correct the pxp_dispatch thread exit logic We should add thread stop checking before handle pxp task, since the wait condition includes this check. Signed-off-by: Fancy Fang --- diff --git a/drivers/dma/pxp/pxp_dma_v2.c b/drivers/dma/pxp/pxp_dma_v2.c index f4a70bdf2c36..63d5d4e91b51 100644 --- a/drivers/dma/pxp/pxp_dma_v2.c +++ b/drivers/dma/pxp/pxp_dma_v2.c @@ -1673,6 +1673,9 @@ static int pxp_dispatch_thread(void *argv) if (signal_pending(current)) continue; + if (kthread_should_stop()) + break; + spin_lock_irqsave(&pxp->lock, flags); pxp->pxp_ongoing = 1; spin_unlock_irqrestore(&pxp->lock, flags);