media: dvb_ca_en50221: use usleep_range
authorJasmin Jessich <jasmin@anw.at>
Sun, 16 Jul 2017 00:43:04 +0000 (20:43 -0400)
committerMauro Carvalho Chehab <mchehab@s-opensource.com>
Thu, 20 Jul 2017 19:28:18 +0000 (15:28 -0400)
Fixed all:
  WARNING: msleep < 20ms can sleep for up to 20ms
by using usleep_range.

Signed-off-by: Jasmin Jessich <jasmin@anw.at>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
drivers/media/dvb-core/dvb_ca_en50221.c

index bb6aa0f86c076e302e7632e37bfb99275c5793fb..725fdd0c2071938c486fa580b343414cd4ca810b 100644 (file)
@@ -313,7 +313,7 @@ static int dvb_ca_en50221_wait_if_status(struct dvb_ca_private *ca, int slot,
                }
 
                /* wait for a bit */
-               msleep(1);
+               usleep_range(1000, 1100);
        }
 
        dprintk("%s failed timeout:%lu\n", __func__, jiffies - start);
@@ -1489,7 +1489,7 @@ static ssize_t dvb_ca_en50221_io_write(struct file *file,
                        if (status != -EAGAIN)
                                goto exit;
 
-                       msleep(1);
+                       usleep_range(1000, 1100);
                }
                if (!written) {
                        status = -EIO;