[PATCH 47/64] drivers: net: bnxt: use setup_timer() helper.

From: Allen Pais
Date: Thu Sep 21 2017 - 13:21:38 EST


Use setup_timer function instead of initializing timer with the
function and data fields.

Signed-off-by: Allen Pais <allen.lkml@xxxxxxxxx>
---
drivers/net/ethernet/broadcom/bnxt/bnxt.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/drivers/net/ethernet/broadcom/bnxt/bnxt.c b/drivers/net/ethernet/broadcom/bnxt/bnxt.c
index aacec8b..c25f5b5 100644
--- a/drivers/net/ethernet/broadcom/bnxt/bnxt.c
+++ b/drivers/net/ethernet/broadcom/bnxt/bnxt.c
@@ -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);
--
2.7.4