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>
Этот коммит содержится в:

коммит произвёл
David S. Miller

родитель
d039ef68e9
Коммит
26566eae80
@@ -7690,9 +7690,9 @@ static void ixgbe_sfp_link_config_subtask(struct ixgbe_adapter *adapter)
|
||||
* ixgbe_service_timer - Timer Call-back
|
||||
* @data: pointer to adapter cast into an unsigned long
|
||||
**/
|
||||
static void ixgbe_service_timer(unsigned long data)
|
||||
static void ixgbe_service_timer(struct timer_list *t)
|
||||
{
|
||||
struct ixgbe_adapter *adapter = (struct ixgbe_adapter *)data;
|
||||
struct ixgbe_adapter *adapter = from_timer(adapter, t, service_timer);
|
||||
unsigned long next_event_offset;
|
||||
|
||||
/* poll faster when waiting for link */
|
||||
@@ -10508,8 +10508,7 @@ skip_sriov:
|
||||
ether_addr_copy(hw->mac.addr, hw->mac.perm_addr);
|
||||
ixgbe_mac_set_default_filter(adapter);
|
||||
|
||||
setup_timer(&adapter->service_timer, &ixgbe_service_timer,
|
||||
(unsigned long) adapter);
|
||||
timer_setup(&adapter->service_timer, ixgbe_service_timer, 0);
|
||||
|
||||
if (ixgbe_removed(hw->hw_addr)) {
|
||||
err = -EIO;
|
||||
|
Ссылка в новой задаче
Block a user