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

index 5a713199653c181e88cfbff7ff3964739826b6f5..1e6ec2277d547aea39870db1387c1894506fb3ee 100644 (file)
@@ -508,9 +508,8 @@ ixgb_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
 
        adapter->part_num = ixgb_get_ee_pba_number(&adapter->hw);
 
-       init_timer(&adapter->watchdog_timer);
-       adapter->watchdog_timer.function = ixgb_watchdog;
-       adapter->watchdog_timer.data = (unsigned long)adapter;
+       setup_timer(&adapter->watchdog_timer, ixgb_watchdog,
+                   (unsigned long)adapter);
 
        INIT_WORK(&adapter->tx_timeout_task, ixgb_tx_timeout_task);