提交 08e28893 编写于 作者: V Vaishali Thakkar 提交者: Greg Kroah-Hartman

Staging: media: lirc: Use setup_timer

This patch introduces the use of function setup_timer
instead of structure assignments as it is the preferred
way to setup and set the timer.

This is done using Coccinelle and semantic patch used is
as follows:

@@
expression x,y,z;
@@

- init_timer (&x);
+ setup_timer (&x, y, z);
- x.function = y;
- x.data = z;
Signed-off-by: NVaishali Thakkar <vthakkar1994@gmail.com>
Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
上级 96748c96
......@@ -683,9 +683,7 @@ static int init_port(void)
}
pr_info("I/O port 0x%.4x, IRQ %d.\n", io, irq);
init_timer(&timerlist);
timerlist.function = sir_timeout;
timerlist.data = 0xabadcafe;
setup_timer(&timerlist, sir_timeout, 0xabadcafe);
return 0;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册