[PATCH] pxa: move registration of clk aliases to where appropriate | |
| [Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] | |
The registration should really be guarded around "if (cpu_is_pxa21x() ...",
so the clk aliases get registered only for pxa25x (note that pxa25x_init()
is a postcore_initcall() and will always be invoked at startup).
With the following additional changes:
1. pxa2xx_clk_aliases changed to pxa25x_clk_aliases
2. use ARRAY_AND_SIZE() to further clean up the code a bit
Signed-off-by: Eric Miao <eric.miao@xxxxxxxxxxx>
---
arch/arm/mach-pxa/pxa25x.c | 7 +++----
1 files changed, 3 insertions(+), 4 deletions(-)
diff --git a/arch/arm/mach-pxa/pxa25x.c b/arch/arm/mach-pxa/pxa25x.c
index c5b845b..3816b7f 100644
--- a/arch/arm/mach-pxa/pxa25x.c
+++ b/arch/arm/mach-pxa/pxa25x.c
@@ -193,7 +193,7 @@ static struct clk pxa25x_clks[] = {
INIT_CKEN("FICPCLK", FICP, 47923000, 0, NULL),
};
-static struct clk pxa2xx_clk_aliases[] = {
+static struct clk pxa25x_clk_aliases[] = {
INIT_CKOTHER("GPIO7_CLK", &pxa25x_clks[4], NULL),
INIT_CKOTHER("SA1111_CLK", &pxa25x_clks[5], NULL),
};
@@ -348,7 +348,8 @@ static int __init pxa25x_init(void)
clks_register(&pxa25x_hwuart_clk, 1);
if (cpu_is_pxa21x() || cpu_is_pxa25x()) {
- clks_register(pxa25x_clks, ARRAY_SIZE(pxa25x_clks));
+ clks_register(ARRAY_AND_SIZE(pxa25x_clks));
+ clks_register(ARRAY_AND_SIZE(pxa25x_clk_aliases));
if ((ret = pxa_init_dma(16)))
return ret;
@@ -371,8 +372,6 @@ static int __init pxa25x_init(void)
if (cpu_is_pxa255())
ret = platform_device_register(&pxa_device_hwuart);
- clks_register(pxa2xx_clk_aliases, ARRAY_SIZE(pxa2xx_clk_aliases));
-
return ret;
}
--
1.5.4.3
-------------------------------------------------------------------
List admin: http://lists.arm.linux.org.uk/mailman/listinfo/linux-arm-kernel
FAQ: http://www.arm.linux.org.uk/mailinglists/faq.php
Etiquette: http://www.arm.linux.org.uk/mailinglists/etiquette.php
[Site Home] [Linux Arm] [Fedora ARM] [Gcc Help] [Git] [DCCP] [IETF Announce] [Security] [PDAs] [Linux] [Linux Book List] [Linux MIPS] [Yosemite Campsites] [Photos]
![]() |
|