Commit 2d04cfcf authored by Allen Pais's avatar Allen Pais Committed by David S. Miller

net: af_packet: use setup_timer() helper.

Use setup_timer function instead of initializing timer with the
function and data fields.
Signed-off-by: default avatarAllen Pais <allen.lkml@gmail.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 39e50d96
...@@ -544,9 +544,7 @@ static void prb_init_blk_timer(struct packet_sock *po, ...@@ -544,9 +544,7 @@ static void prb_init_blk_timer(struct packet_sock *po,
struct tpacket_kbdq_core *pkc, struct tpacket_kbdq_core *pkc,
void (*func) (unsigned long)) void (*func) (unsigned long))
{ {
init_timer(&pkc->retire_blk_timer); setup_timer(&pkc->retire_blk_timer, func, (long)po);
pkc->retire_blk_timer.data = (long)po;
pkc->retire_blk_timer.function = func;
pkc->retire_blk_timer.expires = jiffies; pkc->retire_blk_timer.expires = jiffies;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment