From 08e28893b3886e7f2a2b77adcbdb2bfa91301d3a Mon Sep 17 00:00:00 2001 From: Vaishali Thakkar Date: Wed, 18 Feb 2015 22:22:29 +0530 Subject: [PATCH] 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 Signed-off-by: Greg Kroah-Hartman --- drivers/staging/media/lirc/lirc_sir.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/staging/media/lirc/lirc_sir.c b/drivers/staging/media/lirc/lirc_sir.c index 39f4733fb1ee..d1ada8c72f0d 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; } -- GitLab