diff options
author | Robert P. J. Day <rpjday@mindspring.com> | 2007-07-16 09:47:51 -0400 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@infradead.org> | 2007-07-18 13:24:49 -0400 |
commit | 97989ada7628da262eafb4bebce0a319c7cb0f5f (patch) | |
tree | 9076bed07175f88658d40279ecca8a360bf48743 /drivers | |
parent | f3a43d3082cd9c2308612e0331ad3b1b9d3a7a33 (diff) |
V4L/DVB (5847): Clean up schedule_timeout calls in cpia2 and ivtv code
Signed-off-by: Robert P. J. Day <rpjday@mindspring.com>
Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/media/video/cpia2/cpia2_core.c | 9 | ||||
-rw-r--r-- | drivers/media/video/ivtv/ivtv-gpio.c | 9 |
2 files changed, 6 insertions, 12 deletions
diff --git a/drivers/media/video/cpia2/cpia2_core.c b/drivers/media/video/cpia2/cpia2_core.c index fd771c7a2fe2..55aab8d38880 100644 --- a/drivers/media/video/cpia2/cpia2_core.c +++ b/drivers/media/video/cpia2/cpia2_core.c | |||
@@ -663,15 +663,13 @@ int cpia2_reset_camera(struct camera_data *cam) | |||
663 | cpia2_send_command(cam, &cmd); | 663 | cpia2_send_command(cam, &cmd); |
664 | } | 664 | } |
665 | 665 | ||
666 | current->state = TASK_INTERRUPTIBLE; | 666 | schedule_timeout_interruptible(msecs_to_jiffies(100)); |
667 | schedule_timeout(100 * HZ / 1000); /* wait for 100 msecs */ | ||
668 | 667 | ||
669 | if (cam->params.pnp_id.device_type == DEVICE_STV_672) | 668 | if (cam->params.pnp_id.device_type == DEVICE_STV_672) |
670 | retval = apply_vp_patch(cam); | 669 | retval = apply_vp_patch(cam); |
671 | 670 | ||
672 | /* wait for vp to go to sleep */ | 671 | /* wait for vp to go to sleep */ |
673 | current->state = TASK_INTERRUPTIBLE; | 672 | schedule_timeout_interruptible(msecs_to_jiffies(100)); |
674 | schedule_timeout(100 * HZ / 1000); /* wait for 100 msecs */ | ||
675 | 673 | ||
676 | /*** | 674 | /*** |
677 | * If this is a 676, apply VP5 fixes before we start streaming | 675 | * 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 | set_default_user_mode(cam); | 718 | set_default_user_mode(cam); |
721 | 719 | ||
722 | /* Give VP time to wake up */ | 720 | /* Give VP time to wake up */ |
723 | current->state = TASK_INTERRUPTIBLE; | 721 | schedule_timeout_interruptible(msecs_to_jiffies(100)); |
724 | schedule_timeout(100 * HZ / 1000); /* wait for 100 msecs */ | ||
725 | 722 | ||
726 | set_all_properties(cam); | 723 | set_all_properties(cam); |
727 | 724 | ||
diff --git a/drivers/media/video/ivtv/ivtv-gpio.c b/drivers/media/video/ivtv/ivtv-gpio.c index bc8f8ca2961f..676418cbaaad 100644 --- a/drivers/media/video/ivtv/ivtv-gpio.c +++ b/drivers/media/video/ivtv/ivtv-gpio.c | |||
@@ -115,8 +115,7 @@ void ivtv_reset_ir_gpio(struct ivtv *itv) | |||
115 | curout = (curout & ~0xF) | 1; | 115 | curout = (curout & ~0xF) | 1; |
116 | write_reg(curout, IVTV_REG_GPIO_OUT); | 116 | write_reg(curout, IVTV_REG_GPIO_OUT); |
117 | /* We could use something else for smaller time */ | 117 | /* We could use something else for smaller time */ |
118 | current->state = TASK_INTERRUPTIBLE; | 118 | schedule_timeout_interruptible(msecs_to_jiffies(1)); |
119 | schedule_timeout(1); | ||
120 | curout |= 2; | 119 | curout |= 2; |
121 | write_reg(curout, IVTV_REG_GPIO_OUT); | 120 | write_reg(curout, IVTV_REG_GPIO_OUT); |
122 | curdir &= ~0x80; | 121 | curdir &= ~0x80; |
@@ -138,13 +137,11 @@ int ivtv_reset_tuner_gpio(enum v4l2_tuner_type mode, void *priv, int ptr) | |||
138 | 137 | ||
139 | curout &= ~(1 << 12); | 138 | curout &= ~(1 << 12); |
140 | write_reg(curout, IVTV_REG_GPIO_OUT); | 139 | write_reg(curout, IVTV_REG_GPIO_OUT); |
141 | current->state = TASK_INTERRUPTIBLE; | 140 | schedule_timeout_interruptible(msecs_to_jiffies(1)); |
142 | schedule_timeout(1); | ||
143 | 141 | ||
144 | curout |= (1 << 12); | 142 | curout |= (1 << 12); |
145 | write_reg(curout, IVTV_REG_GPIO_OUT); | 143 | write_reg(curout, IVTV_REG_GPIO_OUT); |
146 | current->state = TASK_INTERRUPTIBLE; | 144 | schedule_timeout_interruptible(msecs_to_jiffies(1)); |
147 | schedule_timeout(1); | ||
148 | 145 | ||
149 | return 0; | 146 | return 0; |
150 | } | 147 | } |