mlx4: use setup_timer()
authorBarret Rhoden <brho@cs.berkeley.edu>
Fri, 30 Aug 2019 19:30:22 +0000 (15:30 -0400)
committerBarret Rhoden <brho@cs.berkeley.edu>
Tue, 1 Oct 2019 14:17:01 +0000 (10:17 -0400)
Instead of setting things by hand.

Signed-off-by: Barret Rhoden <brho@cs.berkeley.edu>
kern/drivers/net/mlx4/catas.c

index d117706..21d5dc2 100644 (file)
@@ -275,7 +275,6 @@ void mlx4_start_catas_poll(struct mlx4_dev *dev)
 #endif
 
        INIT_LIST_HEAD(&priv->catas_err.list);
-       init_timer(&priv->catas_err.timer);
        priv->catas_err.map = NULL;
 
        if (!mlx4_is_slave(dev)) {
@@ -291,8 +290,7 @@ void mlx4_start_catas_poll(struct mlx4_dev *dev)
                }
        }
 
-       priv->catas_err.timer.data     = (unsigned long) dev;
-       priv->catas_err.timer.function = poll_catas;
+       setup_timer(&priv->catas_err.timer, poll_catas, (unsigned long)dev);
        priv->catas_err.timer.expires  =
                round_jiffies(jiffies + MLX4_CATAS_POLL_INTERVAL);
        add_timer(&priv->catas_err.timer);