[PATCH 19/64] drivers: net: slip: use setup_timer() helper.

From
Allen Pais <hidden>
Date
2017-09-21 17:07:47
Also in
linux-can, lkml
Reply to
Allen Pais, 2017-09-21
    Use setup_timer function instead of initializing timer with the
    function and data fields.

Signed-off-by: Allen Pais <redacted>
---
 drivers/net/slip/slip.c | 8 ++------
 1 file changed, 2 insertions(+), 6 deletions(-)
diff --git a/drivers/net/slip/slip.c b/drivers/net/slip/slip.c
index 436dd78..eb8a189 100644
--- a/drivers/net/slip/slip.c
+++ b/drivers/net/slip/slip.c
@@ -763,12 +763,8 @@ static struct slip *sl_alloc(dev_t line)
 	sl->mode        = SL_MODE_DEFAULT;
 #ifdef CONFIG_SLIP_SMART
 	/* initialize timer_list struct */
-	init_timer(&sl->keepalive_timer);
-	sl->keepalive_timer.data = (unsigned long)sl;
-	sl->keepalive_timer.function = sl_keepalive;
-	init_timer(&sl->outfill_timer);
-	sl->outfill_timer.data = (unsigned long)sl;
-	sl->outfill_timer.function = sl_outfill;
+	setup_timer(&sl->keepalive_timer, sl_keepalive, (unsigned long)sl);
+	setup_timer(&sl->outfill_timer, sl_outfill, (unsigned long)sl);
 #endif
 	slip_devs[i] = dev;
 	return sl;
-- 
2.7.4
Thread (67 messages) 67 messages, 2 authors, last reply 2017-09-22
Keyboard shortcuts
hback out one level
jnext message in thread / next series-diff position
kprevious message in thread / previous series-diff position
ldrill in
Escclose help / fold thread tree
?toggle this help