DMA: fixed time loop code
authorSeokju Yoon <sukju.yoon@samsung.com>
Fri, 27 Nov 2015 08:17:06 +0000 (17:17 +0900)
committerTaekki Kim <taekki.kim@samsung.com>
Mon, 14 May 2018 05:42:47 +0000 (14:42 +0900)
Change-Id: I53e9216c0e015709219fb91f1b0cc36a716f13f3
Signed-off-by: Seokju Yoon <sukju.yoon@samsung.com>
drivers/dma/pl330.c

index 287ee47546e63c79058efe4ef704ffb598b7405e..e5539f902bd0ae70ef60a6a1b2aa2f74dca49f11 100644 (file)
@@ -252,7 +252,7 @@ enum pl330_byteswap {
 
 /* Use this _only_ to wait on transient states */
 #define UNTIL(t, s)    do {                                                                    \
-                               unsigned long timeout = msecs_to_jiffies(5);                    \
+                               unsigned long timeout = jiffies + msecs_to_jiffies(5);          \
                                bool timeout_flag = true;                                       \
                                do {                                                            \
                                        if (_state(t) & (s)) {                                  \