diff options
author | Johannes Berg <johannes.berg@intel.com> | 2012-12-03 11:59:24 -0500 |
---|---|---|
committer | Johannes Berg <johannes.berg@intel.com> | 2013-01-03 07:01:22 -0500 |
commit | 9027b1493b57a6a8f9f56741e4c4189048ea5633 (patch) | |
tree | 9a5ac9bba155417560d07b130250015b58772ae5 /net/wireless/reg.c | |
parent | 1a9193185f462a51815fe48491f8a6fb6b942551 (diff) |
regulatory: remove useless locking on exit
It would be a major problem if anything were to run
concurrently while the module is being unloaded so
remove the locking that doesn't help anything.
Acked-by: Luis R. Rodriguez <mcgrof@do-not-panic.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Diffstat (limited to 'net/wireless/reg.c')
-rw-r--r-- | net/wireless/reg.c | 11 |
1 files changed, 3 insertions, 8 deletions
diff --git a/net/wireless/reg.c b/net/wireless/reg.c index cf2fb3425a63..cf4386fade8a 100644 --- a/net/wireless/reg.c +++ b/net/wireless/reg.c | |||
@@ -2382,34 +2382,29 @@ void regulatory_exit(void) | |||
2382 | cancel_work_sync(®_work); | 2382 | cancel_work_sync(®_work); |
2383 | cancel_delayed_work_sync(®_timeout); | 2383 | cancel_delayed_work_sync(®_timeout); |
2384 | 2384 | ||
2385 | /* Lock to suppress warnings */ | ||
2385 | mutex_lock(&cfg80211_mutex); | 2386 | mutex_lock(&cfg80211_mutex); |
2386 | mutex_lock(®_mutex); | 2387 | mutex_lock(®_mutex); |
2387 | |||
2388 | reset_regdomains(true); | 2388 | reset_regdomains(true); |
2389 | mutex_unlock(&cfg80211_mutex); | ||
2390 | mutex_unlock(®_mutex); | ||
2389 | 2391 | ||
2390 | dev_set_uevent_suppress(®_pdev->dev, true); | 2392 | dev_set_uevent_suppress(®_pdev->dev, true); |
2391 | 2393 | ||
2392 | platform_device_unregister(reg_pdev); | 2394 | platform_device_unregister(reg_pdev); |
2393 | 2395 | ||
2394 | spin_lock_bh(®_pending_beacons_lock); | ||
2395 | list_for_each_entry_safe(reg_beacon, btmp, ®_pending_beacons, list) { | 2396 | list_for_each_entry_safe(reg_beacon, btmp, ®_pending_beacons, list) { |
2396 | list_del(®_beacon->list); | 2397 | list_del(®_beacon->list); |
2397 | kfree(reg_beacon); | 2398 | kfree(reg_beacon); |
2398 | } | 2399 | } |
2399 | spin_unlock_bh(®_pending_beacons_lock); | ||
2400 | 2400 | ||
2401 | list_for_each_entry_safe(reg_beacon, btmp, ®_beacon_list, list) { | 2401 | list_for_each_entry_safe(reg_beacon, btmp, ®_beacon_list, list) { |
2402 | list_del(®_beacon->list); | 2402 | list_del(®_beacon->list); |
2403 | kfree(reg_beacon); | 2403 | kfree(reg_beacon); |
2404 | } | 2404 | } |
2405 | 2405 | ||
2406 | spin_lock(®_requests_lock); | ||
2407 | list_for_each_entry_safe(reg_request, tmp, ®_requests_list, list) { | 2406 | list_for_each_entry_safe(reg_request, tmp, ®_requests_list, list) { |
2408 | list_del(®_request->list); | 2407 | list_del(®_request->list); |
2409 | kfree(reg_request); | 2408 | kfree(reg_request); |
2410 | } | 2409 | } |
2411 | spin_unlock(®_requests_lock); | ||
2412 | |||
2413 | mutex_unlock(®_mutex); | ||
2414 | mutex_unlock(&cfg80211_mutex); | ||
2415 | } | 2410 | } |