Skip to content

Commit

Permalink
drivers: net: bnx2: 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 <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
  • Loading branch information
Allen Pais authored and davem330 committed Sep 21, 2017
1 parent 7afd516 commit c41326f
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions drivers/net/ethernet/broadcom/bnx2.c
Original file line number Diff line number Diff line change
Expand Up @@ -8462,10 +8462,8 @@ bnx2_init_board(struct pci_dev *pdev, struct net_device *dev)
bnx2_set_default_link(bp);
bp->req_flow_ctrl = FLOW_CTRL_RX | FLOW_CTRL_TX;

init_timer(&bp->timer);
setup_timer(&bp->timer, bnx2_timer, (unsigned long)bp);
bp->timer.expires = RUN_AT(BNX2_TIMER_INTERVAL);
bp->timer.data = (unsigned long) bp;
bp->timer.function = bnx2_timer;

#ifdef BCM_CNIC
if (bnx2_shmem_rd(bp, BNX2_ISCSI_INITIATOR) & BNX2_ISCSI_INITIATOR_EN)
Expand Down

0 comments on commit c41326f

Please sign in to comment.