staging: greybus: loopback: fix broken udelay

am: 2893a55e39

Change-Id: I6eddb42dbb3e57bc51b7dbf0b932a30b540ee78c
This commit is contained in:
Johan Hovold
2017-03-12 08:15:45 +00:00
committed by android-build-merger

View 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);