提交 18df06c2 编写于 作者: A Allen Pais 提交者: David S. Miller

drivers: net: slip: use setup_timer() helper.

Use setup_timer function instead of initializing timer with the
    function and data fields.
Signed-off-by: NAllen Pais <allen.lkml@gmail.com>
Signed-off-by: NDavid S. Miller <davem@davemloft.net>
上级 dffec39f
...@@ -763,12 +763,8 @@ static struct slip *sl_alloc(dev_t line) ...@@ -763,12 +763,8 @@ static struct slip *sl_alloc(dev_t line)
sl->mode = SL_MODE_DEFAULT; sl->mode = SL_MODE_DEFAULT;
#ifdef CONFIG_SLIP_SMART #ifdef CONFIG_SLIP_SMART
/* initialize timer_list struct */ /* initialize timer_list struct */
init_timer(&sl->keepalive_timer); setup_timer(&sl->keepalive_timer, sl_keepalive, (unsigned long)sl);
sl->keepalive_timer.data = (unsigned long)sl; setup_timer(&sl->outfill_timer, sl_outfill, (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;
#endif #endif
slip_devs[i] = dev; slip_devs[i] = dev;
return sl; return sl;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册