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

net: ti: netcp: use setup_timer

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>
上级 e53a84b2
...@@ -3616,9 +3616,8 @@ static int gbe_probe(struct netcp_device *netcp_device, struct device *dev, ...@@ -3616,9 +3616,8 @@ static int gbe_probe(struct netcp_device *netcp_device, struct device *dev,
} }
spin_unlock_bh(&gbe_dev->hw_stats_lock); spin_unlock_bh(&gbe_dev->hw_stats_lock);
init_timer(&gbe_dev->timer); setup_timer(&gbe_dev->timer, netcp_ethss_timer,
gbe_dev->timer.data = (unsigned long)gbe_dev; (unsigned long)gbe_dev);
gbe_dev->timer.function = netcp_ethss_timer;
gbe_dev->timer.expires = jiffies + GBE_TIMER_INTERVAL; gbe_dev->timer.expires = jiffies + GBE_TIMER_INTERVAL;
add_timer(&gbe_dev->timer); add_timer(&gbe_dev->timer);
*inst_priv = gbe_dev; *inst_priv = gbe_dev;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册