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>
This commit is contained in:
committed by
Johannes Berg
parent
2e3049b79c
commit
70526e543c
@@ -353,7 +353,6 @@ struct mac80211_hwsim_data {
|
|||||||
} ps;
|
} ps;
|
||||||
bool ps_poll_pending;
|
bool ps_poll_pending;
|
||||||
struct dentry *debugfs;
|
struct dentry *debugfs;
|
||||||
struct dentry *debugfs_ps;
|
|
||||||
|
|
||||||
struct sk_buff_head pending; /* packets pending */
|
struct sk_buff_head pending; /* packets pending */
|
||||||
/*
|
/*
|
||||||
@@ -362,7 +361,6 @@ struct mac80211_hwsim_data {
|
|||||||
* radio can be in more then one group.
|
* radio can be in more then one group.
|
||||||
*/
|
*/
|
||||||
u64 group;
|
u64 group;
|
||||||
struct dentry *debugfs_group;
|
|
||||||
|
|
||||||
int power_level;
|
int power_level;
|
||||||
|
|
||||||
@@ -1734,9 +1732,7 @@ static void mac80211_hwsim_free(void)
|
|||||||
spin_unlock_bh(&hwsim_radio_lock);
|
spin_unlock_bh(&hwsim_radio_lock);
|
||||||
|
|
||||||
list_for_each_entry_safe(data, tmpdata, &tmplist, list) {
|
list_for_each_entry_safe(data, tmpdata, &tmplist, list) {
|
||||||
debugfs_remove(data->debugfs_group);
|
debugfs_remove_recursive(data->debugfs);
|
||||||
debugfs_remove(data->debugfs_ps);
|
|
||||||
debugfs_remove(data->debugfs);
|
|
||||||
ieee80211_unregister_hw(data->hw);
|
ieee80211_unregister_hw(data->hw);
|
||||||
device_release_driver(data->dev);
|
device_release_driver(data->dev);
|
||||||
device_unregister(data->dev);
|
device_unregister(data->dev);
|
||||||
@@ -2534,12 +2530,10 @@ static int __init init_mac80211_hwsim(void)
|
|||||||
|
|
||||||
data->debugfs = debugfs_create_dir("hwsim",
|
data->debugfs = debugfs_create_dir("hwsim",
|
||||||
hw->wiphy->debugfsdir);
|
hw->wiphy->debugfsdir);
|
||||||
data->debugfs_ps = debugfs_create_file("ps", 0666,
|
debugfs_create_file("ps", 0666, data->debugfs, data,
|
||||||
data->debugfs, data,
|
&hwsim_fops_ps);
|
||||||
&hwsim_fops_ps);
|
debugfs_create_file("group", 0666, data->debugfs, data,
|
||||||
data->debugfs_group = debugfs_create_file("group", 0666,
|
&hwsim_fops_group);
|
||||||
data->debugfs, data,
|
|
||||||
&hwsim_fops_group);
|
|
||||||
|
|
||||||
tasklet_hrtimer_init(&data->beacon_timer,
|
tasklet_hrtimer_init(&data->beacon_timer,
|
||||||
mac80211_hwsim_beacon,
|
mac80211_hwsim_beacon,
|
||||||
|
Reference in New Issue
Block a user