Commit 70526e543c8087b7fa136fd5e6be98332d609848
Committed by
Johannes Berg
1 parent
2e3049b79c
Exists in
smarc-imx_3.14.28_1.0.0_ga
and in
1 other branch
mac80211_hwsim: use debugfs_remove_recursive
Use debugfs_remove_recursive. That avoids the need for the new dentry pointers and extra debugfs_remove calls. Signed-off-by: Janusz Dziedzic <janusz.dziedzic@tieto.com> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Showing 1 changed file with 5 additions and 11 deletions Side-by-side Diff
drivers/net/wireless/mac80211_hwsim.c
... | ... | @@ -353,7 +353,6 @@ |
353 | 353 | } ps; |
354 | 354 | bool ps_poll_pending; |
355 | 355 | struct dentry *debugfs; |
356 | - struct dentry *debugfs_ps; | |
357 | 356 | |
358 | 357 | struct sk_buff_head pending; /* packets pending */ |
359 | 358 | /* |
... | ... | @@ -362,7 +361,6 @@ |
362 | 361 | * radio can be in more then one group. |
363 | 362 | */ |
364 | 363 | u64 group; |
365 | - struct dentry *debugfs_group; | |
366 | 364 | |
367 | 365 | int power_level; |
368 | 366 | |
... | ... | @@ -1734,9 +1732,7 @@ |
1734 | 1732 | spin_unlock_bh(&hwsim_radio_lock); |
1735 | 1733 | |
1736 | 1734 | list_for_each_entry_safe(data, tmpdata, &tmplist, list) { |
1737 | - debugfs_remove(data->debugfs_group); | |
1738 | - debugfs_remove(data->debugfs_ps); | |
1739 | - debugfs_remove(data->debugfs); | |
1735 | + debugfs_remove_recursive(data->debugfs); | |
1740 | 1736 | ieee80211_unregister_hw(data->hw); |
1741 | 1737 | device_release_driver(data->dev); |
1742 | 1738 | device_unregister(data->dev); |
... | ... | @@ -2534,12 +2530,10 @@ |
2534 | 2530 | |
2535 | 2531 | data->debugfs = debugfs_create_dir("hwsim", |
2536 | 2532 | hw->wiphy->debugfsdir); |
2537 | - data->debugfs_ps = debugfs_create_file("ps", 0666, | |
2538 | - data->debugfs, data, | |
2539 | - &hwsim_fops_ps); | |
2540 | - data->debugfs_group = debugfs_create_file("group", 0666, | |
2541 | - data->debugfs, data, | |
2542 | - &hwsim_fops_group); | |
2533 | + debugfs_create_file("ps", 0666, data->debugfs, data, | |
2534 | + &hwsim_fops_ps); | |
2535 | + debugfs_create_file("group", 0666, data->debugfs, data, | |
2536 | + &hwsim_fops_group); | |
2543 | 2537 | |
2544 | 2538 | tasklet_hrtimer_init(&data->beacon_timer, |
2545 | 2539 | mac80211_hwsim_beacon, |