Skip to content

Commit

Permalink
cfg80211: use list_move_tail instead of list_del/list_add_tail
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Wei Yongjun authored and Johannes Berg committed Sep 5, 2012
1 parent 0ef24e5 commit 00a9ac4
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions net/wireless/reg.c
Original file line number Diff line number Diff line change
Expand Up @@ -1932,8 +1932,7 @@ static void restore_regulatory_settings(bool reset_user)
if (reg_request->initiator !=
NL80211_REGDOM_SET_BY_USER)
continue;
list_del(&reg_request->list);
list_add_tail(&reg_request->list, &tmp_reg_req_list);
list_move_tail(&reg_request->list, &tmp_reg_req_list);
}
}
spin_unlock(&reg_requests_lock);
Expand Down Expand Up @@ -1992,8 +1991,7 @@ static void restore_regulatory_settings(bool reset_user)
"into the queue\n",
reg_request->alpha2[0],
reg_request->alpha2[1]);
list_del(&reg_request->list);
list_add_tail(&reg_request->list, &reg_requests_list);
list_move_tail(&reg_request->list, &reg_requests_list);
}
spin_unlock(&reg_requests_lock);

Expand Down

0 comments on commit 00a9ac4

Please sign in to comment.