提交 570ba3e8 编写于 作者: A Allen Pais 提交者: David S. Miller

drivers: net: enic: 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>
上级 99e3aa1e
...@@ -19,9 +19,8 @@ void enic_flow_may_expire(unsigned long data); ...@@ -19,9 +19,8 @@ void enic_flow_may_expire(unsigned long data);
static inline void enic_rfs_timer_start(struct enic *enic) static inline void enic_rfs_timer_start(struct enic *enic)
{ {
init_timer(&enic->rfs_h.rfs_may_expire); setup_timer(&enic->rfs_h.rfs_may_expire, enic_flow_may_expire,
enic->rfs_h.rfs_may_expire.function = enic_flow_may_expire; (unsigned long)enic);
enic->rfs_h.rfs_may_expire.data = (unsigned long)enic;
mod_timer(&enic->rfs_h.rfs_may_expire, jiffies + HZ/4); mod_timer(&enic->rfs_h.rfs_may_expire, jiffies + HZ/4);
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册