Commit 4d4abf06 authored by Philipp Zabel's avatar Philipp Zabel Committed by Mauro Carvalho Chehab

media: gspca: ov534: replace msleep(10) with usleep_range

For short waits, usleep_range should be used instead of msleep,
see Documentation/timers/timers-howto.txt.
Signed-off-by: default avatarPhilipp Zabel <philipp.zabel@gmail.com>
Signed-off-by: default avatarHans Verkuil <hverkuil-cisco@xs4all.nl>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab+samsung@kernel.org>
parent 86824694
...@@ -679,7 +679,7 @@ static int sccb_check_status(struct gspca_dev *gspca_dev) ...@@ -679,7 +679,7 @@ static int sccb_check_status(struct gspca_dev *gspca_dev)
int i; int i;
for (i = 0; i < 5; i++) { for (i = 0; i < 5; i++) {
msleep(10); usleep_range(10000, 20000);
data = ov534_reg_read(gspca_dev, OV534_REG_STATUS); data = ov534_reg_read(gspca_dev, OV534_REG_STATUS);
switch (data) { switch (data) {
...@@ -1277,7 +1277,7 @@ static int sd_init(struct gspca_dev *gspca_dev) ...@@ -1277,7 +1277,7 @@ static int sd_init(struct gspca_dev *gspca_dev)
/* reset sensor */ /* reset sensor */
sccb_reg_write(gspca_dev, 0x12, 0x80); sccb_reg_write(gspca_dev, 0x12, 0x80);
msleep(10); usleep_range(10000, 20000);
/* probe the sensor */ /* probe the sensor */
sccb_reg_read(gspca_dev, 0x0a); sccb_reg_read(gspca_dev, 0x0a);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment