Skip to content

Commit

Permalink
drivers: net: cxgb: 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 570ba3e commit 66f0689
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions drivers/net/ethernet/chelsio/cxgb/sge.c
Original file line number Diff line number Diff line change
Expand Up @@ -2075,9 +2075,8 @@ struct sge *t1_sge_create(struct adapter *adapter, struct sge_params *p)
goto nomem_port;
}

init_timer(&sge->tx_reclaim_timer);
sge->tx_reclaim_timer.data = (unsigned long)sge;
sge->tx_reclaim_timer.function = sge_tx_reclaim_cb;
setup_timer(&sge->tx_reclaim_timer, sge_tx_reclaim_cb,
(unsigned long)sge);

if (is_T2(sge->adapter)) {
init_timer(&sge->espibug_timer);
Expand Down

0 comments on commit 66f0689

Please sign in to comment.