]> git.proxmox.com Git - mirror_ubuntu-focal-kernel.git/commitdiff
drivers: net: hdlc_ppp: use setup_timer() helper.
authorAllen Pais <allen.lkml@gmail.com>
Thu, 21 Sep 2017 17:05:15 +0000 (22:35 +0530)
committerDavid S. Miller <davem@davemloft.net>
Thu, 21 Sep 2017 18:44:43 +0000 (11:44 -0700)
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>
drivers/net/wan/hdlc_ppp.c

index 0d2e00ece8042884abeb9dc05ecd00f0a03c3ffd..c7721c729541ea2d5d9d439bb4176b0950e3c16c 100644 (file)
@@ -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;