]> git.proxmox.com Git - mirror_ubuntu-hirsute-kernel.git/commitdiff
media: gspca: ov534: replace msleep(10) with usleep_range
authorPhilipp Zabel <philipp.zabel@gmail.com>
Fri, 14 Dec 2018 16:40:24 +0000 (11:40 -0500)
committerMauro Carvalho Chehab <mchehab+samsung@kernel.org>
Wed, 16 Jan 2019 18:48:12 +0000 (13:48 -0500)
For short waits, usleep_range should be used instead of msleep,
see Documentation/timers/timers-howto.txt.

Signed-off-by: Philipp Zabel <philipp.zabel@gmail.com>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
drivers/media/usb/gspca/ov534.c

index d06dc0755b9a5586f93434a47440be353ee1e660..44f06a58bb677f94a2652ff94970fdeed0a96521 100644 (file)
@@ -679,7 +679,7 @@ static int sccb_check_status(struct gspca_dev *gspca_dev)
        int i;
 
        for (i = 0; i < 5; i++) {
-               msleep(10);
+               usleep_range(10000, 20000);
                data = ov534_reg_read(gspca_dev, OV534_REG_STATUS);
 
                switch (data) {
@@ -1277,7 +1277,7 @@ static int sd_init(struct gspca_dev *gspca_dev)
 
        /* reset sensor */
        sccb_reg_write(gspca_dev, 0x12, 0x80);
-       msleep(10);
+       usleep_range(10000, 20000);
 
        /* probe the sensor */
        sccb_reg_read(gspca_dev, 0x0a);