diff options
author | Allen Pais <allen.lkml@gmail.com> | 2017-09-21 19:04:43 +0200 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2017-09-21 20:44:40 +0200 |
commit | ba98e9e2eb32ba8f604f947fa656ef2071d22fa0 (patch) | |
tree | e5d055be0ce32b856abba76974ddf2578e9de4f2 /drivers/net/ethernet/natsemi | |
parent | drivers: net: sun: cassini: use setup_timer() helper. (diff) | |
download | linux-ba98e9e2eb32ba8f604f947fa656ef2071d22fa0.tar.xz linux-ba98e9e2eb32ba8f604f947fa656ef2071d22fa0.zip |
drivers: net: natsemi: 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>
Diffstat (limited to 'drivers/net/ethernet/natsemi')
-rw-r--r-- | drivers/net/ethernet/natsemi/natsemi.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/drivers/net/ethernet/natsemi/natsemi.c b/drivers/net/ethernet/natsemi/natsemi.c index 18af2a23a933..dedeacd0bbca 100644 --- a/drivers/net/ethernet/natsemi/natsemi.c +++ b/drivers/net/ethernet/natsemi/natsemi.c @@ -1571,10 +1571,8 @@ static int netdev_open(struct net_device *dev) dev->name, (int)readl(ioaddr + ChipCmd)); /* Set the timer to check for link beat. */ - init_timer(&np->timer); + setup_timer(&np->timer, netdev_timer, (unsigned long)dev); np->timer.expires = round_jiffies(jiffies + NATSEMI_TIMER_FREQ); - np->timer.data = (unsigned long)dev; - np->timer.function = netdev_timer; /* timer handler */ add_timer(&np->timer); return 0; |