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

drivers: net: mlx5: 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 f1ce56ce
......@@ -320,15 +320,13 @@ void mlx5_start_health_poll(struct mlx5_core_dev *dev)
{
struct mlx5_core_health *health = &dev->priv.health;
init_timer(&health->timer);
setup_timer(&health->timer, poll_health, (unsigned long)dev);
health->sick = 0;
clear_bit(MLX5_DROP_NEW_HEALTH_WORK, &health->flags);
clear_bit(MLX5_DROP_NEW_RECOVERY_WORK, &health->flags);
health->health = &dev->iseg->health;
health->health_counter = &dev->iseg->health_counter;
health->timer.data = (unsigned long)dev;
health->timer.function = poll_health;
health->timer.expires = round_jiffies(jiffies + MLX5_HEALTH_POLL_INTERVAL);
add_timer(&health->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