diff options
author | Dmitry Torokhov <dtor@insightbb.com> | 2007-05-21 10:48:11 -0400 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@infradead.org> | 2007-07-18 13:23:36 -0400 |
commit | 749823a06e74620ff3fefc75eab9d6fa473a9b39 (patch) | |
tree | ad7630af2c5a3ab90c386aa97b71b5a5e40e8fc9 /drivers/media/video/cx88/cx88-input.c | |
parent | b4ba788425f83e0b402a543c816a1cad01873699 (diff) |
V4L/DVB (5683): V4L: cx88 - switch to using msecs_to_jiffies()
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
Diffstat (limited to 'drivers/media/video/cx88/cx88-input.c')
-rw-r--r-- | drivers/media/video/cx88/cx88-input.c | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/drivers/media/video/cx88/cx88-input.c b/drivers/media/video/cx88/cx88-input.c index 8136673fe9e..7ff901f0bf6 100644 --- a/drivers/media/video/cx88/cx88-input.c +++ b/drivers/media/video/cx88/cx88-input.c | |||
@@ -148,20 +148,16 @@ static void ir_timer(unsigned long data) | |||
148 | static void cx88_ir_work(struct work_struct *work) | 148 | static void cx88_ir_work(struct work_struct *work) |
149 | { | 149 | { |
150 | struct cx88_IR *ir = container_of(work, struct cx88_IR, work); | 150 | struct cx88_IR *ir = container_of(work, struct cx88_IR, work); |
151 | unsigned long timeout; | ||
152 | 151 | ||
153 | cx88_ir_handle_key(ir); | 152 | cx88_ir_handle_key(ir); |
154 | timeout = jiffies + (ir->polling * HZ / 1000); | 153 | mod_timer(&ir->timer, jiffies + msecs_to_jiffies(ir->polling)); |
155 | mod_timer(&ir->timer, timeout); | ||
156 | } | 154 | } |
157 | 155 | ||
158 | static void cx88_ir_start(struct cx88_core *core, struct cx88_IR *ir) | 156 | static void cx88_ir_start(struct cx88_core *core, struct cx88_IR *ir) |
159 | { | 157 | { |
160 | if (ir->polling) { | 158 | if (ir->polling) { |
159 | setup_timer(&ir->timer, ir_timer, (unsigned long)ir); | ||
161 | INIT_WORK(&ir->work, cx88_ir_work); | 160 | INIT_WORK(&ir->work, cx88_ir_work); |
162 | init_timer(&ir->timer); | ||
163 | ir->timer.function = ir_timer; | ||
164 | ir->timer.data = (unsigned long)ir; | ||
165 | schedule_work(&ir->work); | 161 | schedule_work(&ir->work); |
166 | } | 162 | } |
167 | if (ir->sampling) { | 163 | if (ir->sampling) { |