diff options
author | Johannes Berg <johannes@sipsolutions.net> | 2009-10-27 12:59:03 +0100 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2009-10-30 16:49:18 -0400 |
commit | 7bcfaf2f431c09c51fe776fc06638b25d3b421c5 (patch) | |
tree | 27f767335566826f11f0134b97ee76b58d9bcf90 /net/mac80211/rate.c | |
parent | 2c0d6100da3ee9b0f0cc46add9bb8a8161299a92 (diff) | |
download | talos-obmc-linux-7bcfaf2f431c09c51fe776fc06638b25d3b421c5.tar.gz talos-obmc-linux-7bcfaf2f431c09c51fe776fc06638b25d3b421c5.zip |
cfg80211/mac80211: use debugfs_remove_recursive
We can save a lot of code and pointers in the structs
by using debugfs_remove_recursive().
First, change cfg80211 to use debugfs_remove_recursive()
so that drivers do not need to clean up any files they
added to the per-wiphy debugfs (if and only if they are
ok to be accessed until after wiphy_unregister!).
Then also make mac80211 use debugfs_remove_recursive()
where necessary -- it need not remove per-wiphy files
as cfg80211 now removes those, but netdev etc. files
still need to be handled but can now be removed without
needing struct dentry pointers to all of them.
Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'net/mac80211/rate.c')
-rw-r--r-- | net/mac80211/rate.c | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/net/mac80211/rate.c b/net/mac80211/rate.c index b33efc4fc267..ccda7454fb17 100644 --- a/net/mac80211/rate.c +++ b/net/mac80211/rate.c @@ -163,8 +163,7 @@ struct rate_control_ref *rate_control_alloc(const char *name, #ifdef CONFIG_MAC80211_DEBUGFS debugfsdir = debugfs_create_dir("rc", local->hw.wiphy->debugfsdir); local->debugfs.rcdir = debugfsdir; - local->debugfs.rcname = debugfs_create_file("name", 0400, debugfsdir, - ref, &rcname_ops); + debugfs_create_file("name", 0400, debugfsdir, ref, &rcname_ops); #endif ref->priv = ref->ops->alloc(&local->hw, debugfsdir); @@ -188,9 +187,7 @@ static void rate_control_release(struct kref *kref) ctrl_ref->ops->free(ctrl_ref->priv); #ifdef CONFIG_MAC80211_DEBUGFS - debugfs_remove(ctrl_ref->local->debugfs.rcname); - ctrl_ref->local->debugfs.rcname = NULL; - debugfs_remove(ctrl_ref->local->debugfs.rcdir); + debugfs_remove_recursive(ctrl_ref->local->debugfs.rcdir); ctrl_ref->local->debugfs.rcdir = NULL; #endif |