summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGabor Juhos <juhosg@openwrt.org>2011-05-07 12:40:25 +0000
committerGabor Juhos <juhosg@openwrt.org>2011-05-07 12:40:25 +0000
commita6708d20d13e42572e8c10d6be989affb1a2fc31 (patch)
tree6599645f1264e1e57bbed155927ef9196c2dcfed
parent3b1b49a49b2cc8a89b409a0d25ec2165a747ac65 (diff)
downloadmaster-31e0f0ae-a6708d20d13e42572e8c10d6be989affb1a2fc31.tar.gz
master-31e0f0ae-a6708d20d13e42572e8c10d6be989affb1a2fc31.tar.bz2
master-31e0f0ae-a6708d20d13e42572e8c10d6be989affb1a2fc31.zip
ar71xx: ag71xx: use debugfs_remove_recursive
SVN-Revision: 26842
-rw-r--r--target/linux/ar71xx/files/drivers/net/ag71xx/ag71xx.h2
-rw-r--r--target/linux/ar71xx/files/drivers/net/ag71xx/ag71xx_debugfs.c33
2 files changed, 7 insertions, 28 deletions
diff --git a/target/linux/ar71xx/files/drivers/net/ag71xx/ag71xx.h b/target/linux/ar71xx/files/drivers/net/ag71xx/ag71xx.h
index bb4cb5ba9f..06bdb35c93 100644
--- a/target/linux/ar71xx/files/drivers/net/ag71xx/ag71xx.h
+++ b/target/linux/ar71xx/files/drivers/net/ag71xx/ag71xx.h
@@ -136,8 +136,6 @@ struct ag71xx_napi_stats {
struct ag71xx_debug {
struct dentry *debugfs_dir;
- struct dentry *debugfs_int_stats;
- struct dentry *debugfs_napi_stats;
struct ag71xx_int_stats int_stats;
struct ag71xx_napi_stats napi_stats;
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 8111cad355..eca0905218 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)