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: Vaishali Thakkar <vthakkar1994@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
Vaishali Thakkar 2015-02-18 22:22:29 +05:30 committed by Greg Kroah-Hartman
parent 96748c9635
commit 08e28893b3
1 changed files with 1 additions and 3 deletions

View File

@ -683,9 +683,7 @@ static int init_port(void)
} }
pr_info("I/O port 0x%.4x, IRQ %d.\n", io, irq); pr_info("I/O port 0x%.4x, IRQ %d.\n", io, irq);
init_timer(&timerlist); setup_timer(&timerlist, sir_timeout, 0xabadcafe);
timerlist.function = sir_timeout;
timerlist.data = 0xabadcafe;
return 0; return 0;
} }