提交 1e153e55 编写于 作者: A Allen Pais 提交者: David S. Miller

drivers: net: appletalk: cops: 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>
上级 07b6901f
...@@ -424,9 +424,7 @@ static int cops_open(struct net_device *dev) ...@@ -424,9 +424,7 @@ static int cops_open(struct net_device *dev)
*/ */
if(lp->board==TANGENT) /* Poll 20 times per second */ if(lp->board==TANGENT) /* Poll 20 times per second */
{ {
init_timer(&cops_timer); setup_timer(&cops_timer, cops_poll, (unsigned long)dev);
cops_timer.function = cops_poll;
cops_timer.data = (unsigned long)dev;
cops_timer.expires = jiffies + HZ/20; cops_timer.expires = jiffies + HZ/20;
add_timer(&cops_timer); add_timer(&cops_timer);
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册