net: af_packet: use setup_timer() helper.
Use setup_timer function instead of initializing timer with the function and data fields. Signed-off-by: Allen Pais <allen.lkml@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
Родитель
39e50d9637
Коммит
2d04cfcfa2
|
@ -544,9 +544,7 @@ static void prb_init_blk_timer(struct packet_sock *po,
|
|||
struct tpacket_kbdq_core *pkc,
|
||||
void (*func) (unsigned long))
|
||||
{
|
||||
init_timer(&pkc->retire_blk_timer);
|
||||
pkc->retire_blk_timer.data = (long)po;
|
||||
pkc->retire_blk_timer.function = func;
|
||||
setup_timer(&pkc->retire_blk_timer, func, (long)po);
|
||||
pkc->retire_blk_timer.expires = jiffies;
|
||||
}
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче