aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/ath/ar5523
diff options
context:
space:
mode:
authorKees Cook <keescook@chromium.org>2017-10-24 02:29:54 -0700
committerKalle Valo <kvalo@qca.qualcomm.com>2017-10-27 16:54:19 +0300
commit7ac767645ab1f2f96b2c84ee8857d72d25c4eadd (patch)
treef32ddfcb2db27630a7aebcd3b4ec098e4b888ff3 /drivers/net/wireless/ath/ar5523
parentwil6210: remove SSID debugfs (diff)
downloadlinux-dev-7ac767645ab1f2f96b2c84ee8857d72d25c4eadd.tar.xz
linux-dev-7ac767645ab1f2f96b2c84ee8857d72d25c4eadd.zip
ath: 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@qca.qualcomm.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@qca.qualcomm.com>
Diffstat (limited to 'drivers/net/wireless/ath/ar5523')
-rw-r--r--drivers/net/wireless/ath/ar5523/ar5523.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/drivers/net/wireless/ath/ar5523/ar5523.c b/drivers/net/wireless/ath/ar5523/ar5523.c
index 68f0463ed8df..b94759daeacc 100644
--- a/drivers/net/wireless/ath/ar5523/ar5523.c
+++ b/drivers/net/wireless/ath/ar5523/ar5523.c
@@ -889,9 +889,9 @@ static void ar5523_tx_work(struct work_struct *work)
mutex_unlock(&ar->mutex);
}
-static void ar5523_tx_wd_timer(unsigned long arg)
+static void ar5523_tx_wd_timer(struct timer_list *t)
{
- struct ar5523 *ar = (struct ar5523 *) arg;
+ struct ar5523 *ar = from_timer(ar, t, tx_wd_timer);
ar5523_dbg(ar, "TX watchdog timer triggered\n");
ieee80211_queue_work(ar->hw, &ar->tx_wd_work);
@@ -1599,8 +1599,7 @@ static int ar5523_probe(struct usb_interface *intf,
mutex_init(&ar->mutex);
INIT_DELAYED_WORK(&ar->stat_work, ar5523_stat_work);
- init_timer(&ar->tx_wd_timer);
- setup_timer(&ar->tx_wd_timer, ar5523_tx_wd_timer, (unsigned long) ar);
+ timer_setup(&ar->tx_wd_timer, ar5523_tx_wd_timer, 0);
INIT_WORK(&ar->tx_wd_work, ar5523_tx_wd_work);
INIT_WORK(&ar->tx_work, ar5523_tx_work);
INIT_LIST_HEAD(&ar->tx_queue_pending);