drivers: net: adi: use setup_timer() helper.
authorAllen Pais <allen.lkml@gmail.com>
Thu, 21 Sep 2017 17:05:10 +0000 (22:35 +0530)
committerDavid S. Miller <davem@davemloft.net>
Thu, 21 Sep 2017 18:44:43 +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/adi/bfin_mac.c

index a251de8d9a9133f1b984e499cd66066ce42c0758..0658cde1586a3fe50a7f0cb22439bd9a5a659d40 100644 (file)
@@ -1650,9 +1650,8 @@ static int bfin_mac_probe(struct platform_device *pdev)
        ndev->netdev_ops = &bfin_mac_netdev_ops;
        ndev->ethtool_ops = &bfin_mac_ethtool_ops;
 
-       init_timer(&lp->tx_reclaim_timer);
-       lp->tx_reclaim_timer.data = (unsigned long)lp;
-       lp->tx_reclaim_timer.function = tx_reclaim_skb_timeout;
+       setup_timer(&lp->tx_reclaim_timer, tx_reclaim_skb_timeout,
+                   (unsigned long)lp);
 
        lp->flags = 0;
        netif_napi_add(ndev, &lp->napi, bfin_mac_poll, CONFIG_BFIN_RX_DESC_NUM);