[PATCH 11/32] staging: gasket: gasket_wait_with_reschedule use msleep

From: Todd Poynor
Date: Tue Jul 17 2018 - 17:07:15 EST


From: Todd Poynor <toddpoynor@xxxxxxxxxx>

Replace schedule_timeout() call with msleep() for simplicity.

Reported-by: Dmitry Torokhov <dtor@xxxxxxxxxxxx>
Signed-off-by: Zhongze Hu <frankhu@xxxxxxxxxxxx>
Signed-off-by: Todd Poynor <toddpoynor@xxxxxxxxxx>
---
drivers/staging/gasket/gasket_core.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/staging/gasket/gasket_core.c b/drivers/staging/gasket/gasket_core.c
index 803566229bfcb..442543573f6e9 100644
--- a/drivers/staging/gasket/gasket_core.c
+++ b/drivers/staging/gasket/gasket_core.c
@@ -14,6 +14,7 @@
#include "gasket_page_table.h"
#include "gasket_sysfs.h"

+#include <linux/delay.h>
#include <linux/fs.h>
#include <linux/init.h>
#include <linux/of.h>
@@ -2097,7 +2098,7 @@ int gasket_wait_with_reschedule(
tmp = gasket_dev_read_64(gasket_dev, bar, offset);
if ((tmp & mask) == val)
break;
- schedule_timeout(msecs_to_jiffies(delay_ms));
+ msleep(delay_ms);
retries++;
}
if (retries == max_retries) {
--
2.18.0.203.gfac676dfb9-goog