Commit 7890d534 authored by Allen Pais's avatar Allen Pais Committed by David S. Miller

drivers: net: caif: use setup_timer() helper.

Use setup_timer function instead of initializing timer with the
    function and data fields.
Signed-off-by: default avatarAllen Pais <allen.lkml@gmail.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 13e96b93
...@@ -1211,17 +1211,14 @@ static int cfhsi_open(struct net_device *ndev) ...@@ -1211,17 +1211,14 @@ static int cfhsi_open(struct net_device *ndev)
init_waitqueue_head(&cfhsi->flush_fifo_wait); init_waitqueue_head(&cfhsi->flush_fifo_wait);
/* Setup the inactivity timer. */ /* Setup the inactivity timer. */
init_timer(&cfhsi->inactivity_timer); setup_timer(&cfhsi->inactivity_timer, cfhsi_inactivity_tout,
cfhsi->inactivity_timer.data = (unsigned long)cfhsi; (unsigned long)cfhsi);
cfhsi->inactivity_timer.function = cfhsi_inactivity_tout;
/* Setup the slowpath RX timer. */ /* Setup the slowpath RX timer. */
init_timer(&cfhsi->rx_slowpath_timer); setup_timer(&cfhsi->rx_slowpath_timer, cfhsi_rx_slowpath,
cfhsi->rx_slowpath_timer.data = (unsigned long)cfhsi; (unsigned long)cfhsi);
cfhsi->rx_slowpath_timer.function = cfhsi_rx_slowpath;
/* Setup the aggregation timer. */ /* Setup the aggregation timer. */
init_timer(&cfhsi->aggregation_timer); setup_timer(&cfhsi->aggregation_timer, cfhsi_aggregation_tout,
cfhsi->aggregation_timer.data = (unsigned long)cfhsi; (unsigned long)cfhsi);
cfhsi->aggregation_timer.function = cfhsi_aggregation_tout;
/* Activate HSI interface. */ /* Activate HSI interface. */
res = cfhsi->ops->cfhsi_up(cfhsi->ops); res = cfhsi->ops->cfhsi_up(cfhsi->ops);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment