ethernet/intel: Convert timers to use timer_setup()
In preparation for unconditionally passing the struct timer_list pointer to all timer callbacks, switch to using the new timer_setup() and from_timer() to pass the timer pointer explicitly. Switches test of .data field to .function, since .data will be going away. Cc: Jeff Kirsher <jeffrey.t.kirsher@intel.com> Cc: intel-wired-lan@lists.osuosl.org Cc: netdev@vger.kernel.org Signed-off-by: Kees Cook <keescook@chromium.org> Signed-off-by: David S. Miller <davem@davemloft.net>
此提交包含在:
@@ -1710,9 +1710,9 @@ static void e100_adjust_adaptive_ifs(struct nic *nic, int speed, int duplex)
|
||||
}
|
||||
}
|
||||
|
||||
static void e100_watchdog(unsigned long data)
|
||||
static void e100_watchdog(struct timer_list *t)
|
||||
{
|
||||
struct nic *nic = (struct nic *)data;
|
||||
struct nic *nic = from_timer(nic, t, watchdog);
|
||||
struct ethtool_cmd cmd = { .cmd = ETHTOOL_GSET };
|
||||
u32 speed;
|
||||
|
||||
@@ -2920,7 +2920,7 @@ static int e100_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
|
||||
|
||||
pci_set_master(pdev);
|
||||
|
||||
setup_timer(&nic->watchdog, e100_watchdog, (unsigned long)nic);
|
||||
timer_setup(&nic->watchdog, e100_watchdog, 0);
|
||||
|
||||
INIT_WORK(&nic->tx_timeout_task, e100_tx_timeout_task);
|
||||
|
||||
|
新增問題並參考
封鎖使用者