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

drivers: net: ns83820: 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>
上级 e7bbad44
...@@ -1652,9 +1652,7 @@ static int ns83820_open(struct net_device *ndev) ...@@ -1652,9 +1652,7 @@ static int ns83820_open(struct net_device *ndev)
writel(0, dev->base + TXDP_HI); writel(0, dev->base + TXDP_HI);
writel(desc, dev->base + TXDP); writel(desc, dev->base + TXDP);
init_timer(&dev->tx_watchdog); setup_timer(&dev->tx_watchdog, ns83820_tx_watch, (unsigned long)ndev);
dev->tx_watchdog.data = (unsigned long)ndev;
dev->tx_watchdog.function = ns83820_tx_watch;
mod_timer(&dev->tx_watchdog, jiffies + 2*HZ); mod_timer(&dev->tx_watchdog, jiffies + 2*HZ);
netif_start_queue(ndev); /* FIXME: wait for phy to come up */ netif_start_queue(ndev); /* FIXME: wait for phy to come up */
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册