]> git.karo-electronics.de Git - karo-tx-linux.git/commit
Staging: comedi: Use function setup_timer for combining initialization
authorSomya Anand <somyaanand214@gmail.com>
Wed, 11 Mar 2015 11:32:13 +0000 (17:02 +0530)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sun, 15 Mar 2015 17:41:15 +0000 (18:41 +0100)
commit81906c357a37bd82ca041bbdde9c663ea656f300
treed485f63cd959148233b8618c74816fae1f94b7e9
parent6946edd07a98e74fa7eedc465dc37a615830a311
Staging: comedi: Use function setup_timer for combining initialization

The function setup_timer combines the initialization of a timer with the
initialization of the timer's function and data fields.

So, this patch combines the multiline code for timer initialization using the function
setup_timer. This issue is identified via coccinelle script.

@@
expression E1, E2, E3;
type T;
@@
- init_timer(&E1);
...
(
- E1.function = E2;
...
- E1.data = (T)E3;
+ setup_timer(&E1, E2, (T)E3);
|
- E1.data = (T)E3;
...
- E1.function = E2;
+ setup_timer(&E1, E2, (T)E3);
|
- E1.function = E2;
+ setup_timer(&E1, E2, 0);
)

Signed-off-by: Somya Anand <somyaanand214@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/comedi/drivers/das16.c
drivers/staging/comedi/drivers/jr3_pci.c