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

drivers: net: mlx4: 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 590deff6
...@@ -277,7 +277,7 @@ void mlx4_start_catas_poll(struct mlx4_dev *dev) ...@@ -277,7 +277,7 @@ void mlx4_start_catas_poll(struct mlx4_dev *dev)
phys_addr_t addr; phys_addr_t addr;
INIT_LIST_HEAD(&priv->catas_err.list); INIT_LIST_HEAD(&priv->catas_err.list);
init_timer(&priv->catas_err.timer); setup_timer(&priv->catas_err.timer, poll_catas, (unsigned long)dev);
priv->catas_err.map = NULL; priv->catas_err.map = NULL;
if (!mlx4_is_slave(dev)) { if (!mlx4_is_slave(dev)) {
...@@ -293,8 +293,6 @@ void mlx4_start_catas_poll(struct mlx4_dev *dev) ...@@ -293,8 +293,6 @@ void mlx4_start_catas_poll(struct mlx4_dev *dev)
} }
} }
priv->catas_err.timer.data = (unsigned long) dev;
priv->catas_err.timer.function = poll_catas;
priv->catas_err.timer.expires = priv->catas_err.timer.expires =
round_jiffies(jiffies + MLX4_CATAS_POLL_INTERVAL); round_jiffies(jiffies + MLX4_CATAS_POLL_INTERVAL);
add_timer(&priv->catas_err.timer); add_timer(&priv->catas_err.timer);
......
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