]> git.proxmox.com Git - mirror_ubuntu-zesty-kernel.git/blobdiff - drivers/staging/greybus/loopback.c
UBUNTU: Ubuntu-4.10.0-37.41
[mirror_ubuntu-zesty-kernel.git] / drivers / staging / greybus / loopback.c
index 7882306adeca9e3737a90003a806c06185cdc0ea..29dc249b0c7446ca137829580845f685cbe3ccfd 100644 (file)
@@ -1051,8 +1051,13 @@ static int gb_loopback_fn(void *data)
                        gb_loopback_calculate_stats(gb, !!error);
                }
                gb->send_count++;
-               if (us_wait)
-                       udelay(us_wait);
+
+               if (us_wait) {
+                       if (us_wait < 20000)
+                               usleep_range(us_wait, us_wait + 100);
+                       else
+                               msleep(us_wait / 1000);
+               }
        }
 
        gb_pm_runtime_put_autosuspend(bundle);