Commit f503c769 authored by Greg Kroah-Hartman's avatar Greg Kroah-Hartman Committed by Kalle Valo

iwlegacy: 3945: no need to check return value of debugfs_create functions

When calling debugfs functions, there is no need to ever check the
return value.  This driver was saving the debugfs file away to be
removed at a later time.  However, the 80211 core would delete the whole
directory that the debugfs files are created in, after it asks the
driver to do the deletion, so just rely on the 80211 core to do all of
the cleanup for us, making us not need to keep a pointer to the dentries
around at all.

This cleans up the structure of the driver data a bit and makes the code
a tiny bit smaller.

Cc: Stanislaw Gruszka <sgruszka@redhat.com>
Cc: Kalle Valo <kvalo@codeaurora.org>
Cc: "David S. Miller" <davem@davemloft.net>
Cc: linux-wireless@vger.kernel.org
Cc: netdev@vger.kernel.org
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: default avatarKalle Valo <kvalo@codeaurora.org>
parent e73e4324
...@@ -861,17 +861,8 @@ il3945_add_debugfs(void *il, void *il_sta, struct dentry *dir) ...@@ -861,17 +861,8 @@ il3945_add_debugfs(void *il, void *il_sta, struct dentry *dir)
{ {
struct il3945_rs_sta *lq_sta = il_sta; struct il3945_rs_sta *lq_sta = il_sta;
lq_sta->rs_sta_dbgfs_stats_table_file =
debugfs_create_file("rate_stats_table", 0600, dir, lq_sta, debugfs_create_file("rate_stats_table", 0600, dir, lq_sta,
&rs_sta_dbgfs_stats_table_ops); &rs_sta_dbgfs_stats_table_ops);
}
static void
il3945_remove_debugfs(void *il, void *il_sta)
{
struct il3945_rs_sta *lq_sta = il_sta;
debugfs_remove(lq_sta->rs_sta_dbgfs_stats_table_file);
} }
#endif #endif
...@@ -898,7 +889,6 @@ static const struct rate_control_ops rs_ops = { ...@@ -898,7 +889,6 @@ static const struct rate_control_ops rs_ops = {
.free_sta = il3945_rs_free_sta, .free_sta = il3945_rs_free_sta,
#ifdef CONFIG_MAC80211_DEBUGFS #ifdef CONFIG_MAC80211_DEBUGFS
.add_sta_debugfs = il3945_add_debugfs, .add_sta_debugfs = il3945_add_debugfs,
.remove_sta_debugfs = il3945_remove_debugfs,
#endif #endif
}; };
......
...@@ -87,9 +87,6 @@ struct il3945_rs_sta { ...@@ -87,9 +87,6 @@ struct il3945_rs_sta {
u8 start_rate; u8 start_rate;
struct timer_list rate_scale_flush; struct timer_list rate_scale_flush;
struct il3945_rate_scale_data win[RATE_COUNT_3945]; struct il3945_rate_scale_data win[RATE_COUNT_3945];
#ifdef CONFIG_MAC80211_DEBUGFS
struct dentry *rs_sta_dbgfs_stats_table_file;
#endif
/* used to be in sta_info */ /* used to be in sta_info */
int last_txrate_idx; int last_txrate_idx;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment