diff mbox

[-next] iwlwifi: mvm: use setup_timer instead of init_timer and data fields

Message ID 1468323657-5909-1-git-send-email-weiyj_lk@163.com (mailing list archive)
State Accepted
Delegated to: Luca Coelho
Headers show

Commit Message

weiyj_lk@163.com July 12, 2016, 11:40 a.m. UTC
From: Wei Yongjun <yongjun_wei@trendmicro.com.cn>

Use setup_timer function instead of initializing timer with the function
and data fields

Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
---
 drivers/net/wireless/intel/iwlwifi/mvm/sta.c | 8 +++-----
 1 file changed, 3 insertions(+), 5 deletions(-)



--
To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Comments

Emmanuel Grumbach July 12, 2016, 11:43 a.m. UTC | #1
On Tue, 2016-07-12 at 11:40 +0000, weiyj_lk@163.com wrote:
> From: Wei Yongjun <yongjun_wei@trendmicro.com.cn>

> 

> Use setup_timer function instead of initializing timer with the

> function

> and data fields

> 

> Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn>

> ---


Thanks - I picked it up and uploaded it to our internal tree.
diff mbox

Patch

diff --git a/drivers/net/wireless/intel/iwlwifi/mvm/sta.c b/drivers/net/wireless/intel/iwlwifi/mvm/sta.c
index f449ef9..7caad55 100644
--- a/drivers/net/wireless/intel/iwlwifi/mvm/sta.c
+++ b/drivers/net/wireless/intel/iwlwifi/mvm/sta.c
@@ -1351,11 +1351,9 @@  int iwl_mvm_sta_rx_agg(struct iwl_mvm *mvm, struct ieee80211_sta *sta,
 		baid_data->baid = baid;
 		baid_data->timeout = timeout;
 		baid_data->last_rx = jiffies;
-		init_timer(&baid_data->session_timer);
-		baid_data->session_timer.function =
-			iwl_mvm_rx_agg_session_expired;
-		baid_data->session_timer.data =
-			(unsigned long)&mvm->baid_map[baid];
+		setup_timer(&baid_data->session_timer,
+			    iwl_mvm_rx_agg_session_expired,
+			    (unsigned long)&mvm->baid_map[baid]);
 		baid_data->mvm = mvm;
 		baid_data->tid = tid;
 		baid_data->sta_id = mvm_sta->sta_id;