diff options
author | Vaishali Thakkar <vthakkar1994@gmail.com> | 2015-03-06 13:53:51 +0300 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2015-03-16 17:46:07 +0300 |
commit | 382d020f4459cd77237c5463098935fd64afdab3 (patch) | |
tree | e8df9089a237c9aedccef60def804811bcea6985 /drivers/staging/rtl8712/rtl871x_mlme.c | |
parent | 6501c8e7d86cca5fab74f873810cbc573273d1b4 (diff) | |
download | linux-382d020f4459cd77237c5463098935fd64afdab3.tar.xz |
Staging: rtl8712: Eliminate use of _cancel_timer
Use timer API function del_timer_sync instead of driver
specific function _cancel_timer as besides deactivating
a timer, it also ensures that the timer is stopped on all
CPUs before the driver exists. Also, variables
timer_cancelled and bool are removed as they are no longer
needed.
@a@
expression x;
identifier y;
@@
- _cancel_timer (&x, &y);
+ del_timer_sync (&x);
@@type T; identifier a.y;@@
- T y;
...when != y
Signed-off-by: Vaishali Thakkar <vthakkar1994@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging/rtl8712/rtl871x_mlme.c')
-rw-r--r-- | drivers/staging/rtl8712/rtl871x_mlme.c | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/drivers/staging/rtl8712/rtl871x_mlme.c b/drivers/staging/rtl8712/rtl871x_mlme.c index 8faa46150f09..ef8a10e568b5 100644 --- a/drivers/staging/rtl8712/rtl871x_mlme.c +++ b/drivers/staging/rtl8712/rtl871x_mlme.c @@ -582,9 +582,7 @@ void r8712_surveydone_event_callback(struct _adapter *adapter, u8 *pbuf) spin_lock_irqsave(&pmlmepriv->lock, irqL); if (check_fwstate(pmlmepriv, _FW_UNDER_SURVEY) == true) { - u8 timer_cancelled; - - _cancel_timer(&pmlmepriv->scan_to_timer, &timer_cancelled); + del_timer_sync(&pmlmepriv->scan_to_timer); _clr_fwstate_(pmlmepriv, _FW_UNDER_SURVEY); } @@ -717,7 +715,6 @@ void r8712_ind_disconnect(struct _adapter *padapter) void r8712_joinbss_event_callback(struct _adapter *adapter, u8 *pbuf) { unsigned long irqL = 0, irqL2; - u8 timer_cancelled; struct sta_info *ptarget_sta = NULL, *pcur_sta = NULL; struct sta_priv *pstapriv = &adapter->stapriv; struct mlme_priv *pmlmepriv = &adapter->mlmepriv; @@ -911,8 +908,7 @@ void r8712_joinbss_event_callback(struct _adapter *adapter, u8 *pbuf) if (check_fwstate(pmlmepriv, WIFI_STATION_STATE) == true) r8712_indicate_connect(adapter); - _cancel_timer(&pmlmepriv->assoc_timer, - &timer_cancelled); + del_timer_sync(&pmlmepriv->assoc_timer); } else goto ignore_joinbss_callback; } else { |