mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-08-27 19:29:37 +00:00
drivers: net: ns83820: use setup_timer() helper.
Use setup_timer function instead of initializing timer with the function and data fields. Signed-off-by: Allen Pais <allen.lkml@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
e7bbad4487
commit
f40c9d5aea
1 changed files with 1 additions and 3 deletions
|
@ -1652,9 +1652,7 @@ static int ns83820_open(struct net_device *ndev)
|
|||
writel(0, dev->base + TXDP_HI);
|
||||
writel(desc, dev->base + TXDP);
|
||||
|
||||
init_timer(&dev->tx_watchdog);
|
||||
dev->tx_watchdog.data = (unsigned long)ndev;
|
||||
dev->tx_watchdog.function = ns83820_tx_watch;
|
||||
setup_timer(&dev->tx_watchdog, ns83820_tx_watch, (unsigned long)ndev);
|
||||
mod_timer(&dev->tx_watchdog, jiffies + 2*HZ);
|
||||
|
||||
netif_start_queue(ndev); /* FIXME: wait for phy to come up */
|
||||
|
|
Loading…
Reference in a new issue