summaryrefslogtreecommitdiffstats
path: root/target/linux/ar71xx/files/drivers/net/ag71xx/ag71xx_debugfs.c
diff options
context:
space:
mode:
authorjuhosg <juhosg@3c298f89-4303-0410-b956-a3cf2f4a3e73>2011-05-07 12:40:25 +0000
committerjuhosg <juhosg@3c298f89-4303-0410-b956-a3cf2f4a3e73>2011-05-07 12:40:25 +0000
commitf6816e49d94c58843d3a418c60042e85c0b80d52 (patch)
tree8eeffdc564e12ba82cb50df56708d91b77a358c6 /target/linux/ar71xx/files/drivers/net/ag71xx/ag71xx_debugfs.c
parentfa0e25197e98ca9cef5a444de06b76b3e23aaa59 (diff)
ar71xx: ag71xx: use debugfs_remove_recursive
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@26842 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'target/linux/ar71xx/files/drivers/net/ag71xx/ag71xx_debugfs.c')
-rw-r--r--target/linux/ar71xx/files/drivers/net/ag71xx/ag71xx_debugfs.c33
1 files changed, 7 insertions, 26 deletions
diff --git a/target/linux/ar71xx/files/drivers/net/ag71xx/ag71xx_debugfs.c b/target/linux/ar71xx/files/drivers/net/ag71xx/ag71xx_debugfs.c
index 8111cad35..eca090521 100644
--- a/target/linux/ar71xx/files/drivers/net/ag71xx/ag71xx_debugfs.c
+++ b/target/linux/ar71xx/files/drivers/net/ag71xx/ag71xx_debugfs.c
@@ -141,9 +141,7 @@ static const struct file_operations ag71xx_fops_napi_stats = {
void ag71xx_debugfs_exit(struct ag71xx *ag)
{
- debugfs_remove(ag->debug.debugfs_napi_stats);
- debugfs_remove(ag->debug.debugfs_int_stats);
- debugfs_remove(ag->debug.debugfs_dir);
+ debugfs_remove_recursive(ag->debug.debugfs_dir);
}
int ag71xx_debugfs_init(struct ag71xx *ag)
@@ -151,31 +149,14 @@ int ag71xx_debugfs_init(struct ag71xx *ag)
ag->debug.debugfs_dir = debugfs_create_dir(ag->dev->name,
ag71xx_debugfs_root);
if (!ag->debug.debugfs_dir)
- goto err;
-
- ag->debug.debugfs_int_stats =
- debugfs_create_file("int_stats",
- S_IRUGO,
- ag->debug.debugfs_dir,
- ag,
- &ag71xx_fops_int_stats);
- if (!ag->debug.debugfs_int_stats)
- goto err;
-
- ag->debug.debugfs_napi_stats =
- debugfs_create_file("napi_stats",
- S_IRUGO,
- ag->debug.debugfs_dir,
- ag,
- &ag71xx_fops_napi_stats);
- if (!ag->debug.debugfs_napi_stats)
- goto err;
+ return -ENOMEM;
- return 0;
+ debugfs_create_file("int_stats", S_IRUGO, ag->debug.debugfs_dir,
+ ag, &ag71xx_fops_int_stats);
+ debugfs_create_file("napi_stats", S_IRUGO, ag->debug.debugfs_dir,
+ ag, &ag71xx_fops_napi_stats);
-err:
- ag71xx_debugfs_exit(ag);
- return -ENOMEM;
+ return 0;
}
int ag71xx_debugfs_root_init(void)