imx-drm: ipu-dc: Use usleep_range instead of msleep
authorPhilipp Zabel <p.zabel@pengutronix.de>
Tue, 25 Feb 2014 11:43:42 +0000 (12:43 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 27 Feb 2014 20:41:10 +0000 (12:41 -0800)
Since msleep(2) can sleep up to 20ms anyway, make this explicit by using
usleep_range(2000, 20000).

Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/imx-drm/ipu-v3/ipu-dc.c

index d0e3bc3c53e708dbf761e4e9a5760935f55c26b8..d5de8bb5c803f87b84dbfea1a2aaac5843f3661a 100644 (file)
@@ -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;