From: Vaishali Thakkar Date: Wed, 18 Feb 2015 16:52:29 +0000 (+0530) Subject: Staging: media: lirc: Use setup_timer X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=08e28893b3886e7f2a2b77adcbdb2bfa91301d3a;p=openwrt%2Fstaging%2Fblogic.git 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 --- 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; }