diff options
Diffstat (limited to 'drivers/net/ethernet/atheros/atlx/atl2.c')
-rw-r--r-- | drivers/net/ethernet/atheros/atlx/atl2.c | 15 |
1 files changed, 7 insertions, 8 deletions
diff --git a/drivers/net/ethernet/atheros/atlx/atl2.c b/drivers/net/ethernet/atheros/atlx/atl2.c index 77a1c03255de..db4bcc51023a 100644 --- a/drivers/net/ethernet/atheros/atlx/atl2.c +++ b/drivers/net/ethernet/atheros/atlx/atl2.c @@ -1028,9 +1028,9 @@ static void atl2_tx_timeout(struct net_device *netdev) * atl2_watchdog - Timer Call-back * @data: pointer to netdev cast into an unsigned long */ -static void atl2_watchdog(unsigned long data) +static void atl2_watchdog(struct timer_list *t) { - struct atl2_adapter *adapter = (struct atl2_adapter *) data; + struct atl2_adapter *adapter = from_timer(adapter, t, watchdog_timer); if (!test_bit(__ATL2_DOWN, &adapter->flags)) { u32 drop_rxd, drop_rxs; @@ -1053,9 +1053,10 @@ static void atl2_watchdog(unsigned long data) * atl2_phy_config - Timer Call-back * @data: pointer to netdev cast into an unsigned long */ -static void atl2_phy_config(unsigned long data) +static void atl2_phy_config(struct timer_list *t) { - struct atl2_adapter *adapter = (struct atl2_adapter *) data; + struct atl2_adapter *adapter = from_timer(adapter, t, + phy_config_timer); struct atl2_hw *hw = &adapter->hw; unsigned long flags; @@ -1434,11 +1435,9 @@ static int atl2_probe(struct pci_dev *pdev, const struct pci_device_id *ent) atl2_check_options(adapter); - setup_timer(&adapter->watchdog_timer, atl2_watchdog, - (unsigned long)adapter); + timer_setup(&adapter->watchdog_timer, atl2_watchdog, 0); - setup_timer(&adapter->phy_config_timer, atl2_phy_config, - (unsigned long)adapter); + timer_setup(&adapter->phy_config_timer, atl2_phy_config, 0); INIT_WORK(&adapter->reset_task, atl2_reset_task); INIT_WORK(&adapter->link_chg_task, atl2_link_chg_task); |