drivers: net: bcm63xx: use setup_timer() helper.
authorAllen Pais <allen.lkml@gmail.com>
Thu, 21 Sep 2017 17:04:27 +0000 (22:34 +0530)
committerDavid S. Miller <davem@davemloft.net>
Thu, 21 Sep 2017 18:44:39 +0000 (11:44 -0700)
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>
drivers/net/ethernet/broadcom/bcm63xx_enet.c

index 4f3845a581269e84738ed4f2f487d1dd755efc2b..f8bbbbfca06e0b259913518b07562a9602e92946 100644 (file)
@@ -1857,9 +1857,8 @@ static int bcm_enet_probe(struct platform_device *pdev)
        spin_lock_init(&priv->rx_lock);
 
        /* init rx timeout (used for oom) */
-       init_timer(&priv->rx_timeout);
-       priv->rx_timeout.function = bcm_enet_refill_rx_timer;
-       priv->rx_timeout.data = (unsigned long)dev;
+       setup_timer(&priv->rx_timeout, bcm_enet_refill_rx_timer,
+                   (unsigned long)dev);
 
        /* init the mib update lock&work */
        mutex_init(&priv->mib_update_lock);