提交 0e340485 编写于 作者: A Alexander Duyck 提交者: David S. Miller

igb: update driver to use setup_timer function

igb was previously setting up all of the timer members itself.  It is
easier to just call setup_timer and reduce the calls to one line.
Signed-off-by: NAlexander Duyck <alexander.h.duyck@intel.com>
Signed-off-by: NJeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: NDavid S. Miller <davem@davemloft.net>
上级 c493ea45
......@@ -1312,13 +1312,10 @@ static int __devinit igb_probe(struct pci_dev *pdev,
goto err_eeprom;
}
init_timer(&adapter->watchdog_timer);
adapter->watchdog_timer.function = &igb_watchdog;
adapter->watchdog_timer.data = (unsigned long) adapter;
init_timer(&adapter->phy_info_timer);
adapter->phy_info_timer.function = &igb_update_phy_info;
adapter->phy_info_timer.data = (unsigned long) adapter;
setup_timer(&adapter->watchdog_timer, &igb_watchdog,
(unsigned long) adapter);
setup_timer(&adapter->phy_info_timer, &igb_update_phy_info,
(unsigned long) adapter);
INIT_WORK(&adapter->reset_task, igb_reset_task);
INIT_WORK(&adapter->watchdog_task, igb_watchdog_task);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册