DMA: fixed time loop code
authorSeokju Yoon <sukju.yoon@samsung.com>
Fri, 27 Nov 2015 08:17:06 +0000 (17:17 +0900)
committerCosmin Tanislav <demonsingur@gmail.com>
Mon, 22 Apr 2024 17:21:50 +0000 (20:21 +0300)
Change-Id: I53e9216c0e015709219fb91f1b0cc36a716f13f3
Signed-off-by: Seokju Yoon <sukju.yoon@samsung.com>
drivers/dma/pl330.c

index e1a12bb8945b8727b26e9dd2264fc67d0d1792ef..7f02329bc1d7eb8ecb1c65c3c028cde01955d1b2 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)) {                                  \