diff options
author | Vaishali Thakkar <vthakkar1994@gmail.com> | 2015-02-18 22:22:29 +0530 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2015-02-26 12:23:59 -0800 |
commit | 08e28893b3886e7f2a2b77adcbdb2bfa91301d3a (patch) | |
tree | ec348c27d8377e8d943ccb0cd55fe7fae82f7922 /drivers/staging/media | |
parent | 96748c9635d736cceb1ba0ad4fd66857f1d5aef5 (diff) | |
download | op-kernel-dev-08e28893b3886e7f2a2b77adcbdb2bfa91301d3a.zip op-kernel-dev-08e28893b3886e7f2a2b77adcbdb2bfa91301d3a.tar.gz |
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>
Diffstat (limited to 'drivers/staging/media')
-rw-r--r-- | drivers/staging/media/lirc/lirc_sir.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/drivers/staging/media/lirc/lirc_sir.c b/drivers/staging/media/lirc/lirc_sir.c index 39f4733..d1ada8c 100644 --- a/drivers/staging/media/lirc/lirc_sir.c +++ b/drivers/staging/media/lirc/lirc_sir.c @@ -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; } |