diff options
author | Kees Cook <keescook@chromium.org> | 2017-10-24 12:28:45 +0300 |
---|---|---|
committer | Kalle Valo <kvalo@codeaurora.org> | 2017-10-27 10:44:48 +0300 |
commit | 2b77839b37345693c565c835179c5f6f50a0ed77 (patch) | |
tree | f471b7f89fc84127cd196aa60f42138b4a8411eb /drivers/net/wireless/intel/iwlegacy/4965-mac.c | |
parent | 7e916cafb4d97227713497723a200be41fe1a4b2 (diff) | |
download | linux-2b77839b37345693c565c835179c5f6f50a0ed77.tar.xz |
iwlegacy: 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.
Cc: Kalle Valo <kvalo@codeaurora.org>
Cc: Stanislaw Gruszka <sgruszka@redhat.com>
Cc: linux-wireless@vger.kernel.org
Cc: netdev@vger.kernel.org
Signed-off-by: Kees Cook <keescook@chromium.org>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
Diffstat (limited to 'drivers/net/wireless/intel/iwlegacy/4965-mac.c')
-rw-r--r-- | drivers/net/wireless/intel/iwlegacy/4965-mac.c | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/drivers/net/wireless/intel/iwlegacy/4965-mac.c b/drivers/net/wireless/intel/iwlegacy/4965-mac.c index 65eba2c24292..de63f2518f23 100644 --- a/drivers/net/wireless/intel/iwlegacy/4965-mac.c +++ b/drivers/net/wireless/intel/iwlegacy/4965-mac.c @@ -4074,9 +4074,9 @@ il4965_hdl_alive(struct il_priv *il, struct il_rx_buf *rxb) * used for calibrating the TXPOWER. */ static void -il4965_bg_stats_periodic(unsigned long data) +il4965_bg_stats_periodic(struct timer_list *t) { - struct il_priv *il = (struct il_priv *)data; + struct il_priv *il = from_timer(il, t, stats_periodic); if (test_bit(S_EXIT_PENDING, &il->status)) return; @@ -6258,10 +6258,9 @@ il4965_setup_deferred_work(struct il_priv *il) INIT_WORK(&il->txpower_work, il4965_bg_txpower_work); - setup_timer(&il->stats_periodic, il4965_bg_stats_periodic, - (unsigned long)il); + timer_setup(&il->stats_periodic, il4965_bg_stats_periodic, 0); - setup_timer(&il->watchdog, il_bg_watchdog, (unsigned long)il); + timer_setup(&il->watchdog, il_bg_watchdog, 0); tasklet_init(&il->irq_tasklet, (void (*)(unsigned long))il4965_irq_tasklet, |