Commit f3f2f984 authored by Taehee Yoo's avatar Taehee Yoo Committed by David S. Miller

hsr: use debugfs_remove_recursive() instead of debugfs_remove()

If it uses debugfs_remove_recursive() instead of debugfs_remove(),
hsr_priv() doesn't need to have "node_tbl_file" pointer variable.
Signed-off-by: default avatarTaehee Yoo <ap420073@gmail.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 892e0915
......@@ -113,7 +113,6 @@ void hsr_debugfs_init(struct hsr_priv *priv, struct net_device *hsr_dev)
priv->node_tbl_root = NULL;
return;
}
priv->node_tbl_file = de;
}
/* hsr_debugfs_term - Tear down debugfs intrastructure
......@@ -125,9 +124,7 @@ void hsr_debugfs_init(struct hsr_priv *priv, struct net_device *hsr_dev)
void
hsr_debugfs_term(struct hsr_priv *priv)
{
debugfs_remove(priv->node_tbl_file);
priv->node_tbl_file = NULL;
debugfs_remove(priv->node_tbl_root);
debugfs_remove_recursive(priv->node_tbl_root);
priv->node_tbl_root = NULL;
}
......
......@@ -166,7 +166,6 @@ struct hsr_priv {
unsigned char sup_multicast_addr[ETH_ALEN];
#ifdef CONFIG_DEBUG_FS
struct dentry *node_tbl_root;
struct dentry *node_tbl_file;
#endif
};
......
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