From: Allen Pais Date: Mon, 25 Sep 2017 07:30:02 +0000 (+0530) Subject: net: af_packet: use setup_timer() helper. X-Git-Url: http://git.cdn.openwrt.org/?a=commitdiff_plain;h=2d04cfcfa2e86cac751979b584e5420dd470903b;p=openwrt%2Fstaging%2Fblogic.git 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 Signed-off-by: David S. Miller --- 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; }