Skip to content

Commit

Permalink
drivers: net: lmc: use setup_timer() helper.
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Allen Pais authored and David S. Miller committed Sep 21, 2017
1 parent 804dea9 commit 19569c8
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions drivers/net/wan/lmc/lmc_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -1084,10 +1084,8 @@ static int lmc_open(struct net_device *dev)
* Setup a timer for the watchdog on probe, and start it running.
* Since lmc_ok == 0, it will be a NOP for now.
*/
init_timer (&sc->timer);
setup_timer(&sc->timer, lmc_watchdog, (unsigned long)dev);
sc->timer.expires = jiffies + HZ;
sc->timer.data = (unsigned long) dev;
sc->timer.function = lmc_watchdog;
add_timer (&sc->timer);

lmc_trace(dev, "lmc_open out");
Expand Down

0 comments on commit 19569c8

Please sign in to comment.