Skip to content

Commit

Permalink
drivers: net: hdlc_ppp: 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 f280333 commit 8d81fe7
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions drivers/net/wan/hdlc_ppp.c
Original file line number Diff line number Diff line change
Expand Up @@ -610,9 +610,7 @@ static void ppp_start(struct net_device *dev)
for (i = 0; i < IDX_COUNT; i++) {
struct proto *proto = &ppp->protos[i];
proto->dev = dev;
init_timer(&proto->timer);
proto->timer.function = ppp_timer;
proto->timer.data = (unsigned long)proto;
setup_timer(&proto->timer, ppp_timer, (unsigned long)proto);
proto->state = CLOSED;
}
ppp->protos[IDX_LCP].pid = PID_LCP;
Expand Down

0 comments on commit 8d81fe7

Please sign in to comment.