From: Philipp Zabel Date: Tue, 25 Feb 2014 11:43:42 +0000 (+0100) Subject: imx-drm: ipu-dc: Use usleep_range instead of msleep X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=1f15b69b597087937f370179661cc468f46ce545;p=GitHub%2FLineageOS%2FG12%2Fandroid_kernel_amlogic_linux-4.9.git imx-drm: ipu-dc: Use usleep_range instead of msleep Since msleep(2) can sleep up to 20ms anyway, make this explicit by using usleep_range(2000, 20000). Signed-off-by: Philipp Zabel Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/staging/imx-drm/ipu-v3/ipu-dc.c b/drivers/staging/imx-drm/ipu-v3/ipu-dc.c index d0e3bc3c53e7..d5de8bb5c803 100644 --- a/drivers/staging/imx-drm/ipu-v3/ipu-dc.c +++ b/drivers/staging/imx-drm/ipu-v3/ipu-dc.c @@ -262,7 +262,7 @@ void ipu_dc_disable_channel(struct ipu_dc *dc) /* Wait for DC triple buffer to empty */ while ((readl(priv->dc_reg + DC_STAT) & val) != val) { - msleep(2); + usleep_range(2000, 20000); timeout -= 2; if (timeout <= 0) break;