Commit b4ba7884 authored by Dmitry Torokhov's avatar Dmitry Torokhov Committed by Mauro Carvalho Chehab

V4L/DVB (5682): SAA7134 - switch to use msecs_to_jiffies()

Signed-off-by: default avatarDmitry Torokhov <dtor@mail.ru>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@infradead.org>
parent c57032de
...@@ -153,21 +153,18 @@ void saa7134_input_irq(struct saa7134_dev *dev) ...@@ -153,21 +153,18 @@ void saa7134_input_irq(struct saa7134_dev *dev)
static void saa7134_input_timer(unsigned long data) static void saa7134_input_timer(unsigned long data)
{ {
struct saa7134_dev *dev = (struct saa7134_dev*)data; struct saa7134_dev *dev = (struct saa7134_dev *)data;
struct card_ir *ir = dev->remote; struct card_ir *ir = dev->remote;
unsigned long timeout;
build_key(dev); build_key(dev);
timeout = jiffies + (ir->polling * HZ / 1000); mod_timer(&ir->timer, jiffies + msecs_to_jiffies(ir->polling));
mod_timer(&ir->timer, timeout);
} }
static void saa7134_ir_start(struct saa7134_dev *dev, struct card_ir *ir) static void saa7134_ir_start(struct saa7134_dev *dev, struct card_ir *ir)
{ {
if (ir->polling) { if (ir->polling) {
init_timer(&ir->timer); setup_timer(&ir->timer, saa7134_input_timer,
ir->timer.function = saa7134_input_timer; (unsigned long)dev);
ir->timer.data = (unsigned long)dev;
ir->timer.expires = jiffies + HZ; ir->timer.expires = jiffies + HZ;
add_timer(&ir->timer); add_timer(&ir->timer);
} else if (ir->rc5_gpio) { } else if (ir->rc5_gpio) {
......
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