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>
This commit is contained in:
committed by
Mauro Carvalho Chehab
parent
b4ba788425
commit
749823a06e
@@ -148,20 +148,16 @@ static void ir_timer(unsigned long data)
|
|||||||
static void cx88_ir_work(struct work_struct *work)
|
static void cx88_ir_work(struct work_struct *work)
|
||||||
{
|
{
|
||||||
struct cx88_IR *ir = container_of(work, struct cx88_IR, work);
|
struct cx88_IR *ir = container_of(work, struct cx88_IR, work);
|
||||||
unsigned long timeout;
|
|
||||||
|
|
||||||
cx88_ir_handle_key(ir);
|
cx88_ir_handle_key(ir);
|
||||||
timeout = jiffies + (ir->polling * HZ / 1000);
|
mod_timer(&ir->timer, jiffies + msecs_to_jiffies(ir->polling));
|
||||||
mod_timer(&ir->timer, timeout);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static void cx88_ir_start(struct cx88_core *core, struct cx88_IR *ir)
|
static void cx88_ir_start(struct cx88_core *core, struct cx88_IR *ir)
|
||||||
{
|
{
|
||||||
if (ir->polling) {
|
if (ir->polling) {
|
||||||
|
setup_timer(&ir->timer, ir_timer, (unsigned long)ir);
|
||||||
INIT_WORK(&ir->work, cx88_ir_work);
|
INIT_WORK(&ir->work, cx88_ir_work);
|
||||||
init_timer(&ir->timer);
|
|
||||||
ir->timer.function = ir_timer;
|
|
||||||
ir->timer.data = (unsigned long)ir;
|
|
||||||
schedule_work(&ir->work);
|
schedule_work(&ir->work);
|
||||||
}
|
}
|
||||||
if (ir->sampling) {
|
if (ir->sampling) {
|
||||||
|
Reference in New Issue
Block a user