aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm
diff options
context:
space:
mode:
authorTero Kristo <t-kristo@ti.com>2014-05-11 21:54:58 -0400
committerPaul Walmsley <paul@pwsan.com>2014-05-16 00:34:51 -0400
commitd8871cd245ece932ced994457e044d0f68b0aab4 (patch)
tree13388f9dc727f869a9778f5225609177182ebaf1 /arch/arm
parent4794208c5b0122e51e3e13830bb707466b638c4c (diff)
ARM: OMAP2+: PRM: remove unnecessary cpu_is_XXX calls from prm_init / exit
Done in preparation to make PRM its own driver, as the cpu_is_XXX calls are not available outside mach-omap2 folder. The init functions are called only from cpu specific init chain, and thus don't need to double check against cpu type. The exit calls check against the data provided during init-time registration and thus don't need cpu check either. Signed-off-by: Tero Kristo <t-kristo@ti.com> [paul@pwsan.com: updated to apply] Signed-off-by: Paul Walmsley <paul@pwsan.com>
Diffstat (limited to 'arch/arm')
-rw-r--r--arch/arm/mach-omap2/prm2xxx.c13
-rw-r--r--arch/arm/mach-omap2/prm3xxx.c10
-rw-r--r--arch/arm/mach-omap2/prm44xx.c10
3 files changed, 3 insertions, 30 deletions
diff --git a/arch/arm/mach-omap2/prm2xxx.c b/arch/arm/mach-omap2/prm2xxx.c
index 418de9c3b319..a3a3cca2bcc4 100644
--- a/arch/arm/mach-omap2/prm2xxx.c
+++ b/arch/arm/mach-omap2/prm2xxx.c
@@ -18,9 +18,6 @@
18#include <linux/io.h> 18#include <linux/io.h>
19#include <linux/irq.h> 19#include <linux/irq.h>
20 20
21#include "soc.h"
22#include "common.h"
23#include "vp.h"
24#include "powerdomain.h" 21#include "powerdomain.h"
25#include "clockdomain.h" 22#include "clockdomain.h"
26#include "prm2xxx.h" 23#include "prm2xxx.h"
@@ -201,19 +198,11 @@ static struct prm_ll_data omap2xxx_prm_ll_data = {
201 198
202int __init omap2xxx_prm_init(void) 199int __init omap2xxx_prm_init(void)
203{ 200{
204 if (!cpu_is_omap24xx())
205 return 0;
206
207 return prm_register(&omap2xxx_prm_ll_data); 201 return prm_register(&omap2xxx_prm_ll_data);
208} 202}
209 203
210static void __exit omap2xxx_prm_exit(void) 204static void __exit omap2xxx_prm_exit(void)
211{ 205{
212 if (!cpu_is_omap24xx()) 206 prm_unregister(&omap2xxx_prm_ll_data);
213 return;
214
215 /* Should never happen */
216 WARN(prm_unregister(&omap2xxx_prm_ll_data),
217 "%s: prm_ll_data function pointer mismatch\n", __func__);
218} 207}
219__exitcall(omap2xxx_prm_exit); 208__exitcall(omap2xxx_prm_exit);
diff --git a/arch/arm/mach-omap2/prm3xxx.c b/arch/arm/mach-omap2/prm3xxx.c
index 7721990d2006..4c89aa2f1e81 100644
--- a/arch/arm/mach-omap2/prm3xxx.c
+++ b/arch/arm/mach-omap2/prm3xxx.c
@@ -406,9 +406,6 @@ static struct prm_ll_data omap3xxx_prm_ll_data = {
406 406
407int __init omap3xxx_prm_init(void) 407int __init omap3xxx_prm_init(void)
408{ 408{
409 if (!cpu_is_omap34xx())
410 return 0;
411
412 return prm_register(&omap3xxx_prm_ll_data); 409 return prm_register(&omap3xxx_prm_ll_data);
413} 410}
414 411
@@ -431,11 +428,6 @@ omap_subsys_initcall(omap3xxx_prm_late_init);
431 428
432static void __exit omap3xxx_prm_exit(void) 429static void __exit omap3xxx_prm_exit(void)
433{ 430{
434 if (!cpu_is_omap34xx()) 431 prm_unregister(&omap3xxx_prm_ll_data);
435 return;
436
437 /* Should never happen */
438 WARN(prm_unregister(&omap3xxx_prm_ll_data),
439 "%s: prm_ll_data function pointer mismatch\n", __func__);
440} 432}
441__exitcall(omap3xxx_prm_exit); 433__exitcall(omap3xxx_prm_exit);
diff --git a/arch/arm/mach-omap2/prm44xx.c b/arch/arm/mach-omap2/prm44xx.c
index 03a603476cfc..15171890f805 100644
--- a/arch/arm/mach-omap2/prm44xx.c
+++ b/arch/arm/mach-omap2/prm44xx.c
@@ -660,9 +660,6 @@ static struct prm_ll_data omap44xx_prm_ll_data = {
660 660
661int __init omap44xx_prm_init(void) 661int __init omap44xx_prm_init(void)
662{ 662{
663 if (!cpu_is_omap44xx() && !soc_is_omap54xx() && !soc_is_dra7xx())
664 return 0;
665
666 return prm_register(&omap44xx_prm_ll_data); 663 return prm_register(&omap44xx_prm_ll_data);
667} 664}
668 665
@@ -679,11 +676,6 @@ omap_subsys_initcall(omap44xx_prm_late_init);
679 676
680static void __exit omap44xx_prm_exit(void) 677static void __exit omap44xx_prm_exit(void)
681{ 678{
682 if (!cpu_is_omap44xx()) 679 prm_unregister(&omap44xx_prm_ll_data);
683 return;
684
685 /* Should never happen */
686 WARN(prm_unregister(&omap44xx_prm_ll_data),
687 "%s: prm_ll_data function pointer mismatch\n", __func__);
688} 680}
689__exitcall(omap44xx_prm_exit); 681__exitcall(omap44xx_prm_exit);