[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <1506013525-29291-20-git-send-email-allen.lkml@gmail.com>
Date: Thu, 21 Sep 2017 22:34:40 +0530
From: Allen Pais <allen.lkml@...il.com>
To: netdev@...r.kernel.org
Cc: linux-kernel@...r.kernel.org, m.grzeschik@...gutronix.de,
dmitry.tarnyagin@...kless.no, wg@...ndegger.com,
mkl@...gutronix.de, mark.einon@...il.com, linux@...linux.org.uk,
pcnet32@...ntier.com, f.fainelli@...il.com,
bcm-kernel-feedback-list@...adcom.com, venza@...wnhat.org,
ajk@...nets.uni-bremen.de, jes@...ined-monkey.org,
romieu@...zoreil.com, khc@...waw.pl, simon@...kelleys.org.uk,
davem@...emloft.net, linux-can@...r.kernel.org,
adi-buildroot-devel@...ts.sourceforge.net,
Allen Pais <allen.lkml@...il.com>
Subject: [PATCH 19/64] drivers: net: slip: 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@...il.com>
---
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
Powered by blists - more mailing lists