mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: navin patidar <navin.patidar@gmail.com>
To: gregkh@linuxfoundation.org
Cc: Larry.Finger@lwfinger.net, devel@driverdev.osuosl.org,
	linux-kernel@vger.kernel.org,
	navin patidar <navin.patidar@gmail.com>
Subject: [PATCH 42/42] staging: rtl8188eu: Replace _cancel_timer() with del_timer_sync()
Date: Sun, 22 Jun 2014 14:21:46 +0530	[thread overview]
Message-ID: <1403427107-12744-14-git-send-email-navin.patidar@gmail.com> (raw)
In-Reply-To: <1403427107-12744-1-git-send-email-navin.patidar@gmail.com>

Signed-off-by: navin patidar <navin.patidar@gmail.com>
---
 drivers/staging/rtl8188eu/core/rtw_cmd.c          |    3 +--
 drivers/staging/rtl8188eu/core/rtw_mlme.c         |    8 ++------
 drivers/staging/rtl8188eu/core/rtw_p2p.c          |    4 +---
 drivers/staging/rtl8188eu/include/osdep_service.h |    6 ------
 4 files changed, 4 insertions(+), 17 deletions(-)

diff --git a/drivers/staging/rtl8188eu/core/rtw_cmd.c b/drivers/staging/rtl8188eu/core/rtw_cmd.c
index 556d17d..aeaa873 100644
--- a/drivers/staging/rtl8188eu/core/rtw_cmd.c
+++ b/drivers/staging/rtl8188eu/core/rtw_cmd.c
@@ -2084,7 +2084,6 @@ void rtw_joinbss_cmd_callback(struct adapter *padapter,  struct cmd_obj *pcmd)
 
 void rtw_createbss_cmd_callback(struct adapter *padapter, struct cmd_obj *pcmd)
 {
-	u8 timer_cancelled;
 	struct sta_info *psta = NULL;
 	struct wlan_network *pwlan = NULL;
 	struct	mlme_priv *pmlmepriv = &padapter->mlmepriv;
@@ -2097,7 +2096,7 @@ void rtw_createbss_cmd_callback(struct adapter *padapter, struct cmd_obj *pcmd)
 		_set_timer(&pmlmepriv->assoc_timer, 1);
 	}
 
-	_cancel_timer(&pmlmepriv->assoc_timer, &timer_cancelled);
+	del_timer_sync(&pmlmepriv->assoc_timer);
 
 	spin_lock_bh(&pmlmepriv->lock);
 
diff --git a/drivers/staging/rtl8188eu/core/rtw_mlme.c b/drivers/staging/rtl8188eu/core/rtw_mlme.c
index c03442d..0cb9e15 100644
--- a/drivers/staging/rtl8188eu/core/rtw_mlme.c
+++ b/drivers/staging/rtl8188eu/core/rtw_mlme.c
@@ -725,10 +725,7 @@ void rtw_surveydone_event_callback(struct adapter	*adapter, u8 *pbuf)
 	RT_TRACE(_module_rtl871x_mlme_c_, _drv_info_, ("rtw_surveydone_event_callback: fw_state:%x\n\n", get_fwstate(pmlmepriv)));
 
 	if (check_fwstate(pmlmepriv, _FW_UNDER_SURVEY)) {
-		u8 timer_cancelled;
-
-		_cancel_timer(&pmlmepriv->scan_to_timer, &timer_cancelled);
-
+		del_timer_sync(&pmlmepriv->scan_to_timer);
 		_clr_fwstate_(pmlmepriv, _FW_UNDER_SURVEY);
 	} else {
 		RT_TRACE(_module_rtl871x_mlme_c_, _drv_err_, ("nic status=%x, survey done event comes too late!\n", get_fwstate(pmlmepriv)));
@@ -1103,7 +1100,6 @@ static void rtw_joinbss_update_network(struct adapter *padapter, struct wlan_net
 
 void rtw_joinbss_event_prehandle(struct adapter *adapter, u8 *pbuf)
 {
-	u8 timer_cancelled;
 	struct sta_info *ptarget_sta = NULL, *pcur_sta = NULL;
 	struct	sta_priv *pstapriv = &adapter->stapriv;
 	struct	mlme_priv	*pmlmepriv = &(adapter->mlmepriv);
@@ -1196,7 +1192,7 @@ void rtw_joinbss_event_prehandle(struct adapter *adapter, u8 *pbuf)
 				}
 
 			/* s5. Cancle assoc_timer */
-			_cancel_timer(&pmlmepriv->assoc_timer, &timer_cancelled);
+			del_timer_sync(&pmlmepriv->assoc_timer);
 
 			RT_TRACE(_module_rtl871x_mlme_c_, _drv_info_, ("Cancle assoc_timer\n"));
 
diff --git a/drivers/staging/rtl8188eu/core/rtw_p2p.c b/drivers/staging/rtl8188eu/core/rtw_p2p.c
index 6023a85..e1fd198 100644
--- a/drivers/staging/rtl8188eu/core/rtw_p2p.c
+++ b/drivers/staging/rtl8188eu/core/rtw_p2p.c
@@ -1404,9 +1404,7 @@ u8 process_p2p_group_negotation_confirm(struct wifidirect_info *pwdinfo, u8 *pfr
 			result = attr_content;
 
 			if (attr_content == P2P_STATUS_SUCCESS) {
-				u8	bcancelled = 0;
-
-				_cancel_timer(&pwdinfo->restore_p2p_state_timer, &bcancelled);
+				del_timer_sync(&pwdinfo->restore_p2p_state_timer);
 
 				/*	Commented by Albert 20100911 */
 				/*	Todo: Need to handle the case which both Intents are the same. */
diff --git a/drivers/staging/rtl8188eu/include/osdep_service.h b/drivers/staging/rtl8188eu/include/osdep_service.h
index 2d07dea..95131fe 100644
--- a/drivers/staging/rtl8188eu/include/osdep_service.h
+++ b/drivers/staging/rtl8188eu/include/osdep_service.h
@@ -90,12 +90,6 @@ static inline void _set_timer(struct timer_list *ptimer, u32 delay_time)
 	mod_timer(ptimer , (jiffies+(delay_time*HZ/1000)));
 }
 
-static inline void _cancel_timer(struct timer_list *ptimer, u8 *bcancelled)
-{
-	del_timer_sync(ptimer);
-	*bcancelled = true;/* true ==1; false==0 */
-}
-
 #define RTW_TIMER_HDL_ARGS void *FunctionContext
 #define RTW_TIMER_HDL_NAME(name) rtw_##name##_timer_hdl
 #define RTW_DECLARE_TIMER_HDL(name) \
-- 
1.7.10.4


      parent reply	other threads:[~2014-06-22  8:53 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-06-22  8:51 [PATCH 29/42] staging: rtl8188eu: Use get_unaligned_be16() instead of RTW_GET_BE16() navin patidar
2014-06-22  8:51 ` [PATCH 30/42] staging: rtl8188eu: Remove unused inline function bitshift() navin patidar
2014-06-22  8:51 ` [PATCH 31/42] staging: rtl8188eu: Use get_unaligned_le16() instead of RTW_GET_LE16() navin patidar
2014-06-22  8:51 ` [PATCH 32/42] staging: rtl8188eu: Use cpu_to_le16() insted of RTW_PUT_LE16() navin patidar
2014-06-22  8:51 ` [PATCH 33/42] staging: rtl8188eu: osdep_service.h: Remove unused function definations navin patidar
2014-06-22  8:51 ` [PATCH 34/42] staging: rtl8188eu: Remove unused inline function _RND256() navin patidar
2014-06-22  8:51 ` [PATCH 35/42] staging: rtl8188eu: Use round_up() instead of _RND128() navin patidar
2014-06-22  8:51 ` [PATCH 36/42] staging: rtl8188eu: Use round_up() instead of _RND8() navin patidar
2014-06-22  8:51 ` [PATCH 37/42] staging: rtl8188eu: Use round_up() instead of _RND4() navin patidar
2014-06-22  8:51 ` [PATCH 38/42] staging: rtl8188eu: osdep_service.h: Remove unused macros navin patidar
2014-06-22  8:51 ` [PATCH 39/42] staging: rtl8188eu: Use round_up() instead of RND4() navin patidar
2014-06-22  8:51 ` [PATCH 40/42] staging: rtl8188eu: Remove function thread_enter() navin patidar
2014-06-22  8:51 ` [PATCH 41/42] staging: rtl8188eu: Remove function flush_signals_thread() navin patidar
2014-06-22  8:51 ` navin patidar [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1403427107-12744-14-git-send-email-navin.patidar@gmail.com \
    --to=navin.patidar@gmail.com \
    --cc=Larry.Finger@lwfinger.net \
    --cc=devel@driverdev.osuosl.org \
    --cc=gregkh@linuxfoundation.org \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®