diff options
Diffstat (limited to 'arch/arm/mach-ux500')
-rw-r--r-- | arch/arm/mach-ux500/clock.c | 31 | ||||
-rw-r--r-- | arch/arm/mach-ux500/platsmp.c | 8 |
2 files changed, 7 insertions, 32 deletions
diff --git a/arch/arm/mach-ux500/clock.c b/arch/arm/mach-ux500/clock.c index 32ce90840ee1..7d107be63eb4 100644 --- a/arch/arm/mach-ux500/clock.c +++ b/arch/arm/mach-ux500/clock.c | |||
@@ -635,16 +635,13 @@ 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 | const char *p = c->name; |
640 | char *p = s; | ||
641 | 640 | ||
642 | if (c->name == NULL) | 641 | if (!p) |
643 | p += sprintf(p, "BUG"); | 642 | p = "BUG"; |
644 | else | ||
645 | p += sprintf(p, "%s", c->name); | ||
646 | 643 | ||
647 | clk_d = debugfs_create_dir(s, p_dentry); | 644 | clk_d = debugfs_create_dir(p, p_dentry); |
648 | if (!clk_d) | 645 | if (!clk_d) |
649 | return NULL; | 646 | return NULL; |
650 | 647 | ||
@@ -666,24 +663,10 @@ static struct dentry *clk_debugfs_register_dir(struct clk *c, | |||
666 | return clk_d; | 663 | return clk_d; |
667 | 664 | ||
668 | err_out: | 665 | err_out: |
669 | d = clk_d; | 666 | 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; | 667 | return NULL; |
674 | } | 668 | } |
675 | 669 | ||
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) | 670 | static int clk_debugfs_register_one(struct clk *c) |
688 | { | 671 | { |
689 | struct clk *pa = c->parent_periph; | 672 | struct clk *pa = c->parent_periph; |
@@ -700,7 +683,7 @@ static int clk_debugfs_register_one(struct clk *c) | |||
700 | c->dent_bus = clk_debugfs_register_dir(c, | 683 | c->dent_bus = clk_debugfs_register_dir(c, |
701 | bpa->dent_bus ? bpa->dent_bus : bpa->dent); | 684 | bpa->dent_bus ? bpa->dent_bus : bpa->dent); |
702 | if ((!c->dent_bus) && (c->dent)) { | 685 | if ((!c->dent_bus) && (c->dent)) { |
703 | clk_debugfs_remove_dir(c->dent); | 686 | debugfs_remove_recursive(c->dent); |
704 | c->dent = NULL; | 687 | c->dent = NULL; |
705 | return -ENOMEM; | 688 | return -ENOMEM; |
706 | } | 689 | } |
diff --git a/arch/arm/mach-ux500/platsmp.c b/arch/arm/mach-ux500/platsmp.c index 0c527fe2cebb..a33df5f4c27a 100644 --- a/arch/arm/mach-ux500/platsmp.c +++ b/arch/arm/mach-ux500/platsmp.c | |||
@@ -172,14 +172,6 @@ void __init smp_init_cpus(void) | |||
172 | 172 | ||
173 | void __init platform_smp_prepare_cpus(unsigned int max_cpus) | 173 | void __init platform_smp_prepare_cpus(unsigned int max_cpus) |
174 | { | 174 | { |
175 | int i; | ||
176 | |||
177 | /* | ||
178 | * Initialise the present map, which describes the set of CPUs | ||
179 | * actually populated at the present time. | ||
180 | */ | ||
181 | for (i = 0; i < max_cpus; i++) | ||
182 | set_cpu_present(i, true); | ||
183 | 175 | ||
184 | scu_enable(scu_base_addr()); | 176 | scu_enable(scu_base_addr()); |
185 | wakeup_secondary(); | 177 | wakeup_secondary(); |