diff options
author | Allen Pais <allen.lkml@gmail.com> | 2017-09-21 22:35:04 +0530 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2017-09-21 11:44:42 -0700 |
commit | d2a0012e7632a588683ad6320529659c4cd27131 (patch) | |
tree | a22916f073526a6934d1ca89408b73fa128ccc7e | |
parent | 590deff6e7a898fadf3f1fd6425937d481913fb1 (diff) | |
download | linux-d2a0012e7632a588683ad6320529659c4cd27131.tar.gz linux-d2a0012e7632a588683ad6320529659c4cd27131.tar.bz2 linux-d2a0012e7632a588683ad6320529659c4cd27131.zip |
drivers: net: mlx4: use setup_timer() helper.
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>
-rw-r--r-- | drivers/net/ethernet/mellanox/mlx4/catas.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/drivers/net/ethernet/mellanox/mlx4/catas.c b/drivers/net/ethernet/mellanox/mlx4/catas.c index 53daa6ca5d83..de0f9e5e42ec 100644 --- a/drivers/net/ethernet/mellanox/mlx4/catas.c +++ b/drivers/net/ethernet/mellanox/mlx4/catas.c @@ -277,7 +277,7 @@ void mlx4_start_catas_poll(struct mlx4_dev *dev) phys_addr_t addr; 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; if (!mlx4_is_slave(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 = round_jiffies(jiffies + MLX4_CATAS_POLL_INTERVAL); add_timer(&priv->catas_err.timer); |