diff options
Diffstat (limited to 'drivers/media/video/saa7134/saa7134-input.c')
-rw-r--r-- | drivers/media/video/saa7134/saa7134-input.c | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/drivers/media/video/saa7134/saa7134-input.c b/drivers/media/video/saa7134/saa7134-input.c index 817d4b62e222..2de8c2acb660 100644 --- a/drivers/media/video/saa7134/saa7134-input.c +++ b/drivers/media/video/saa7134/saa7134-input.c | |||
@@ -153,21 +153,18 @@ void saa7134_input_irq(struct saa7134_dev *dev) | |||
153 | 153 | ||
154 | static void saa7134_input_timer(unsigned long data) | 154 | static void saa7134_input_timer(unsigned long data) |
155 | { | 155 | { |
156 | struct saa7134_dev *dev = (struct saa7134_dev*)data; | 156 | struct saa7134_dev *dev = (struct saa7134_dev *)data; |
157 | struct card_ir *ir = dev->remote; | 157 | struct card_ir *ir = dev->remote; |
158 | unsigned long timeout; | ||
159 | 158 | ||
160 | build_key(dev); | 159 | build_key(dev); |
161 | timeout = jiffies + (ir->polling * HZ / 1000); | 160 | mod_timer(&ir->timer, jiffies + msecs_to_jiffies(ir->polling)); |
162 | mod_timer(&ir->timer, timeout); | ||
163 | } | 161 | } |
164 | 162 | ||
165 | static void saa7134_ir_start(struct saa7134_dev *dev, struct card_ir *ir) | 163 | static void saa7134_ir_start(struct saa7134_dev *dev, struct card_ir *ir) |
166 | { | 164 | { |
167 | if (ir->polling) { | 165 | if (ir->polling) { |
168 | init_timer(&ir->timer); | 166 | setup_timer(&ir->timer, saa7134_input_timer, |
169 | ir->timer.function = saa7134_input_timer; | 167 | (unsigned long)dev); |
170 | ir->timer.data = (unsigned long)dev; | ||
171 | ir->timer.expires = jiffies + HZ; | 168 | ir->timer.expires = jiffies + HZ; |
172 | add_timer(&ir->timer); | 169 | add_timer(&ir->timer); |
173 | } else if (ir->rc5_gpio) { | 170 | } else if (ir->rc5_gpio) { |