Skip to content

Commit

Permalink
drivers: net: caif: 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 13e96b9 commit 7890d53
Showing 1 changed file with 6 additions and 9 deletions.
15 changes: 6 additions & 9 deletions drivers/net/caif/caif_hsi.c
Original file line number Diff line number Diff line change
Expand Up @@ -1211,17 +1211,14 @@ static int cfhsi_open(struct net_device *ndev)
init_waitqueue_head(&cfhsi->flush_fifo_wait);

/* Setup the inactivity timer. */
init_timer(&cfhsi->inactivity_timer);
cfhsi->inactivity_timer.data = (unsigned long)cfhsi;
cfhsi->inactivity_timer.function = cfhsi_inactivity_tout;
setup_timer(&cfhsi->inactivity_timer, cfhsi_inactivity_tout,
(unsigned long)cfhsi);
/* Setup the slowpath RX timer. */
init_timer(&cfhsi->rx_slowpath_timer);
cfhsi->rx_slowpath_timer.data = (unsigned long)cfhsi;
cfhsi->rx_slowpath_timer.function = cfhsi_rx_slowpath;
setup_timer(&cfhsi->rx_slowpath_timer, cfhsi_rx_slowpath,
(unsigned long)cfhsi);
/* Setup the aggregation timer. */
init_timer(&cfhsi->aggregation_timer);
cfhsi->aggregation_timer.data = (unsigned long)cfhsi;
cfhsi->aggregation_timer.function = cfhsi_aggregation_tout;
setup_timer(&cfhsi->aggregation_timer, cfhsi_aggregation_tout,
(unsigned long)cfhsi);

/* Activate HSI interface. */
res = cfhsi->ops->cfhsi_up(cfhsi->ops);
Expand Down

0 comments on commit 7890d53

Please sign in to comment.