OSDN Git Service

staging: gasket: gasket_wait_with_reschedule use msleep
authorTodd Poynor <toddpoynor@google.com>
Tue, 17 Jul 2018 20:56:51 +0000 (13:56 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 19 Jul 2018 09:39:47 +0000 (11:39 +0200)
Replace schedule_timeout() call with msleep() for simplicity.

Reported-by: Dmitry Torokhov <dtor@chromium.org>
Signed-off-by: Zhongze Hu <frankhu@chromium.org>
Signed-off-by: Todd Poynor <toddpoynor@google.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/gasket/gasket_core.c

index 8035662..4425435 100644 (file)
@@ -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) {