summaryrefslogtreecommitdiffstats
path: root/net/packet
diff options
context:
space:
mode:
authorAllen Pais <allen.lkml@gmail.com>2017-09-25 13:00:02 +0530
committerDavid S. Miller <davem@davemloft.net>2017-09-25 13:19:19 -0700
commit2d04cfcfa2e86cac751979b584e5420dd470903b (patch)
tree6bbb40f7ed060f57701c350a4d4f1d00e4165807 /net/packet
parent39e50d9637f9a31967ac9e956b829ee8b50a750f (diff)
downloadlinux-2d04cfcfa2e86cac751979b584e5420dd470903b.tar.bz2
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>
Diffstat (limited to 'net/packet')
-rw-r--r--net/packet/af_packet.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/net/packet/af_packet.c b/net/packet/af_packet.c
index d288f52c53f7..b0f221885dfd 100644
--- a/net/packet/af_packet.c
+++ b/net/packet/af_packet.c
@@ -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;
}