cfg80211: use list_move_tail instead of list_del/list_add_tail
Using list_move_tail() instead of list_del() + list_add_tail().
Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
diff --git a/net/wireless/reg.c b/net/wireless/reg.c
index 2303ee7..c6e0d46 100644
--- a/net/wireless/reg.c
+++ b/net/wireless/reg.c
@@ -1932,8 +1932,7 @@
if (reg_request->initiator !=
NL80211_REGDOM_SET_BY_USER)
continue;
- list_del(®_request->list);
- list_add_tail(®_request->list, &tmp_reg_req_list);
+ list_move_tail(®_request->list, &tmp_reg_req_list);
}
}
spin_unlock(®_requests_lock);
@@ -1992,8 +1991,7 @@
"into the queue\n",
reg_request->alpha2[0],
reg_request->alpha2[1]);
- list_del(®_request->list);
- list_add_tail(®_request->list, ®_requests_list);
+ list_move_tail(®_request->list, ®_requests_list);
}
spin_unlock(®_requests_lock);