Commit 97989ada authored by Robert P. J. Day's avatar Robert P. J. Day Committed by Mauro Carvalho Chehab

V4L/DVB (5847): Clean up schedule_timeout calls in cpia2 and ivtv code

Signed-off-by: default avatarRobert P. J. Day <rpjday@mindspring.com>
Signed-off-by: default avatarHans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@infradead.org>
parent f3a43d30
...@@ -663,15 +663,13 @@ int cpia2_reset_camera(struct camera_data *cam) ...@@ -663,15 +663,13 @@ int cpia2_reset_camera(struct camera_data *cam)
cpia2_send_command(cam, &cmd); cpia2_send_command(cam, &cmd);
} }
current->state = TASK_INTERRUPTIBLE; schedule_timeout_interruptible(msecs_to_jiffies(100));
schedule_timeout(100 * HZ / 1000); /* wait for 100 msecs */
if (cam->params.pnp_id.device_type == DEVICE_STV_672) if (cam->params.pnp_id.device_type == DEVICE_STV_672)
retval = apply_vp_patch(cam); retval = apply_vp_patch(cam);
/* wait for vp to go to sleep */ /* wait for vp to go to sleep */
current->state = TASK_INTERRUPTIBLE; schedule_timeout_interruptible(msecs_to_jiffies(100));
schedule_timeout(100 * HZ / 1000); /* wait for 100 msecs */
/*** /***
* If this is a 676, apply VP5 fixes before we start streaming * If this is a 676, apply VP5 fixes before we start streaming
...@@ -720,8 +718,7 @@ int cpia2_reset_camera(struct camera_data *cam) ...@@ -720,8 +718,7 @@ int cpia2_reset_camera(struct camera_data *cam)
set_default_user_mode(cam); set_default_user_mode(cam);
/* Give VP time to wake up */ /* Give VP time to wake up */
current->state = TASK_INTERRUPTIBLE; schedule_timeout_interruptible(msecs_to_jiffies(100));
schedule_timeout(100 * HZ / 1000); /* wait for 100 msecs */
set_all_properties(cam); set_all_properties(cam);
......
...@@ -115,8 +115,7 @@ void ivtv_reset_ir_gpio(struct ivtv *itv) ...@@ -115,8 +115,7 @@ void ivtv_reset_ir_gpio(struct ivtv *itv)
curout = (curout & ~0xF) | 1; curout = (curout & ~0xF) | 1;
write_reg(curout, IVTV_REG_GPIO_OUT); write_reg(curout, IVTV_REG_GPIO_OUT);
/* We could use something else for smaller time */ /* We could use something else for smaller time */
current->state = TASK_INTERRUPTIBLE; schedule_timeout_interruptible(msecs_to_jiffies(1));
schedule_timeout(1);
curout |= 2; curout |= 2;
write_reg(curout, IVTV_REG_GPIO_OUT); write_reg(curout, IVTV_REG_GPIO_OUT);
curdir &= ~0x80; curdir &= ~0x80;
...@@ -138,13 +137,11 @@ int ivtv_reset_tuner_gpio(enum v4l2_tuner_type mode, void *priv, int ptr) ...@@ -138,13 +137,11 @@ int ivtv_reset_tuner_gpio(enum v4l2_tuner_type mode, void *priv, int ptr)
curout &= ~(1 << 12); curout &= ~(1 << 12);
write_reg(curout, IVTV_REG_GPIO_OUT); write_reg(curout, IVTV_REG_GPIO_OUT);
current->state = TASK_INTERRUPTIBLE; schedule_timeout_interruptible(msecs_to_jiffies(1));
schedule_timeout(1);
curout |= (1 << 12); curout |= (1 << 12);
write_reg(curout, IVTV_REG_GPIO_OUT); write_reg(curout, IVTV_REG_GPIO_OUT);
current->state = TASK_INTERRUPTIBLE; schedule_timeout_interruptible(msecs_to_jiffies(1));
schedule_timeout(1);
return 0; return 0;
} }
......
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