]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/commitdiff
drivers: net: bnxt: use setup_timer() helper.
authorAllen Pais <allen.lkml@gmail.com>
Thu, 21 Sep 2017 17:05:08 +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/ethernet/broadcom/bnxt/bnxt.c

index aacec8bc19d5fbf6fe0f007d8a6a59fe2df23c8d..c25f5b555adfa1c6b4f603b191599accb541b434 100644 (file)
@@ -7190,9 +7190,7 @@ static int bnxt_init_board(struct pci_dev *pdev, struct net_device *dev)
 
        bp->stats_coal_ticks = BNXT_DEF_STATS_COAL_TICKS;
 
-       init_timer(&bp->timer);
-       bp->timer.data = (unsigned long)bp;
-       bp->timer.function = bnxt_timer;
+       setup_timer(&bp->timer, bnxt_timer, (unsigned long)bp);
        bp->current_interval = BNXT_TIMER_INTERVAL;
 
        clear_bit(BNXT_STATE_OPEN, &bp->state);