Merge branch 'sh-latest' of git://git.kernel.org/pub/scm/linux/kernel/git/lethal...
[linux-2.6.git] / drivers / sh / clk / core.c
index 229ad0991f2660b6ff3682124d6c22cb38cf9ad9..dc8d022c07a1505b2cc0bd86ccfb2e097c6f1f16 100644 (file)
@@ -673,7 +673,7 @@ static struct dentry *clk_debugfs_root;
 static int clk_debugfs_register_one(struct clk *c)
 {
        int err;
-       struct dentry *d, *child, *child_tmp;
+       struct dentry *d;
        struct clk *pa = c->parent;
        char s[255];
        char *p = s;
@@ -702,10 +702,7 @@ static int clk_debugfs_register_one(struct clk *c)
        return 0;
 
 err_out:
-       d = c->dentry;
-       list_for_each_entry_safe(child, child_tmp, &d->d_subdirs, d_u.d_child)
-               debugfs_remove(child);
-       debugfs_remove(c->dentry);
+       debugfs_remove_recursive(c->dentry);
        return err;
 }