]> git.baikalelectronics.ru Git - kernel.git/commit
net/hsr: Use setup_timer and mod_timer.
authorMuhammad Falak R Wani <falakreyaz@gmail.com>
Sun, 15 May 2016 14:07:44 +0000 (19:37 +0530)
committerDavid S. Miller <davem@davemloft.net>
Mon, 16 May 2016 18:00:43 +0000 (14:00 -0400)
commita63728de3aec02ef18f5ffa3f3090d1901d68471
tree48881f377255a238004621bff414373869fe0440
parentd0dd481a7ea9d435eb35d896b87d3285757594df
net/hsr: Use setup_timer and mod_timer.

The function setup_timer combines the initialization of a timer with the
initialization of the timer's function and data fields. The mulitiline
code for timer initialization is now replaced with function setup_timer.

Also, quoting the mod_timer() function comment:
-> mod_timer() is a more efficient way to update the expire field of an
   active timer (if the timer is inactive it will be activated).

Use setup_timer() and mod_timer() to setup and arm a timer, making the
code compact and aid readablity.

Signed-off-by: Muhammad Falak R Wani <falakreyaz@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/hsr/hsr_device.c