Skip to content

Commit 2d04cfc

Browse files
Allen Paisdavem330
authored andcommitted
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>
1 parent 39e50d9 commit 2d04cfc

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

net/packet/af_packet.c

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -544,9 +544,7 @@ static void prb_init_blk_timer(struct packet_sock *po,
544544
struct tpacket_kbdq_core *pkc,
545545
void (*func) (unsigned long))
546546
{
547-
init_timer(&pkc->retire_blk_timer);
548-
pkc->retire_blk_timer.data = (long)po;
549-
pkc->retire_blk_timer.function = func;
547+
setup_timer(&pkc->retire_blk_timer, func, (long)po);
550548
pkc->retire_blk_timer.expires = jiffies;
551549
}
552550

0 commit comments

Comments
 (0)