Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1736864

[PATCH 18/64] drivers: net: cisco_hdlc: use setup_timer() helper.

From Allen Pais <allen.lkml@gmail.com>
Newsgroups linux.kernel
Subject [PATCH 18/64] drivers: net: cisco_hdlc: use setup_timer() helper.
Date 2017-09-21 19:10 +0200
Message-ID <usd98-3OI-11@gated-at.bofh.it> (permalink)
References <usd97-3OI-3@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


    Use setup_timer function instead of initializing timer with the
    function and data fields.

Signed-off-by: Allen Pais <allen.lkml@gmail.com>
---
 drivers/net/wan/hdlc_cisco.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/drivers/net/wan/hdlc_cisco.c b/drivers/net/wan/hdlc_cisco.c
index a408abc..c696d42 100644
--- a/drivers/net/wan/hdlc_cisco.c
+++ b/drivers/net/wan/hdlc_cisco.c
@@ -293,10 +293,8 @@ static void cisco_start(struct net_device *dev)
 	st->up = st->txseq = st->rxseq = 0;
 	spin_unlock_irqrestore(&st->lock, flags);
 
-	init_timer(&st->timer);
+	setup_timer(&st->timer, cisco_timer, (unsigned long)dev);
 	st->timer.expires = jiffies + HZ; /* First poll after 1 s */
-	st->timer.function = cisco_timer;
-	st->timer.data = (unsigned long)dev;
 	add_timer(&st->timer);
 }
 
-- 
2.7.4

Back to linux.kernel | Previous | Next | Find similar | Unroll thread


Thread

[PATCH 18/64] drivers: net: cisco_hdlc: use setup_timer() helper. Allen Pais <allen.lkml@gmail.com> - 2017-09-21 19:10 +0200

csiph-web