summaryrefslogtreecommitdiffstats
path: root/net/packet/af_packet.c
diff options
context:
space:
mode:
authorAllen Pais2017-09-25 09:30:02 +0200
committerDavid S. Miller2017-09-25 22:19:19 +0200
commit2d04cfcfa2e86cac751979b584e5420dd470903b (patch)
tree6bbb40f7ed060f57701c350a4d4f1d00e4165807 /net/packet/af_packet.c
parentforcedeth: optimize the xmit/rx with unlikely (diff)
downloadkernel-qcow2-linux-2d04cfcfa2e86cac751979b584e5420dd470903b.tar.gz
kernel-qcow2-linux-2d04cfcfa2e86cac751979b584e5420dd470903b.tar.xz
kernel-qcow2-linux-2d04cfcfa2e86cac751979b584e5420dd470903b.zip
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/af_packet.c')
-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;
}