diff options
author | Al Viro <viro@zeniv.linux.org.uk> | 2011-07-16 12:37:57 -0400 |
---|---|---|
committer | Al Viro <viro@zeniv.linux.org.uk> | 2011-07-20 20:47:51 -0400 |
commit | 12520c438f48113593130d210eba821a532c893b (patch) | |
tree | 006161e31976b8ec72097d97829e9bbeced68e9b /arch/arm/mach-ux500/clock.c | |
parent | f15146380d28b746df3c8b81b392812eb982382a (diff) |
switch assorted clock drivers to debugfs_remove_recursive()
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'arch/arm/mach-ux500/clock.c')
-rw-r--r-- | arch/arm/mach-ux500/clock.c | 20 |
1 files changed, 3 insertions, 17 deletions
diff --git a/arch/arm/mach-ux500/clock.c b/arch/arm/mach-ux500/clock.c index 32ce90840ee1..1d8509d59c09 100644 --- a/arch/arm/mach-ux500/clock.c +++ b/arch/arm/mach-ux500/clock.c | |||
@@ -635,7 +635,7 @@ static const struct file_operations set_rate_fops = { | |||
635 | static struct dentry *clk_debugfs_register_dir(struct clk *c, | 635 | static struct dentry *clk_debugfs_register_dir(struct clk *c, |
636 | struct dentry *p_dentry) | 636 | struct dentry *p_dentry) |
637 | { | 637 | { |
638 | struct dentry *d, *clk_d, *child, *child_tmp; | 638 | struct dentry *d, *clk_d; |
639 | char s[255]; | 639 | char s[255]; |
640 | char *p = s; | 640 | char *p = s; |
641 | 641 | ||
@@ -666,24 +666,10 @@ static struct dentry *clk_debugfs_register_dir(struct clk *c, | |||
666 | return clk_d; | 666 | return clk_d; |
667 | 667 | ||
668 | err_out: | 668 | err_out: |
669 | d = clk_d; | 669 | debugfs_remove_recursive(clk_d); |
670 | list_for_each_entry_safe(child, child_tmp, &d->d_subdirs, d_u.d_child) | ||
671 | debugfs_remove(child); | ||
672 | debugfs_remove(clk_d); | ||
673 | return NULL; | 670 | return NULL; |
674 | } | 671 | } |
675 | 672 | ||
676 | static void clk_debugfs_remove_dir(struct dentry *cdentry) | ||
677 | { | ||
678 | struct dentry *d, *child, *child_tmp; | ||
679 | |||
680 | d = cdentry; | ||
681 | list_for_each_entry_safe(child, child_tmp, &d->d_subdirs, d_u.d_child) | ||
682 | debugfs_remove(child); | ||
683 | debugfs_remove(cdentry); | ||
684 | return ; | ||
685 | } | ||
686 | |||
687 | static int clk_debugfs_register_one(struct clk *c) | 673 | static int clk_debugfs_register_one(struct clk *c) |
688 | { | 674 | { |
689 | struct clk *pa = c->parent_periph; | 675 | struct clk *pa = c->parent_periph; |
@@ -700,7 +686,7 @@ static int clk_debugfs_register_one(struct clk *c) | |||
700 | c->dent_bus = clk_debugfs_register_dir(c, | 686 | c->dent_bus = clk_debugfs_register_dir(c, |
701 | bpa->dent_bus ? bpa->dent_bus : bpa->dent); | 687 | bpa->dent_bus ? bpa->dent_bus : bpa->dent); |
702 | if ((!c->dent_bus) && (c->dent)) { | 688 | if ((!c->dent_bus) && (c->dent)) { |
703 | clk_debugfs_remove_dir(c->dent); | 689 | debugfs_remove_recursive(c->dent); |
704 | c->dent = NULL; | 690 | c->dent = NULL; |
705 | return -ENOMEM; | 691 | return -ENOMEM; |
706 | } | 692 | } |