ARM: Consolidate clks_register() and similar
Most machine classes want some way to register a block of clk_lookup structures, and most do it by implementing a clks_register() type function which walks an array, or by open-coding a loop. Consolidate all this into clkdev_add_table(). Acked-by: H Hartley Sweeten <hsweeten@visionengravers.com> Reviewed-by: Kevin Hilman <khilman@deeprootsystems.com> Acked-by: Eric Miao <eric.y.miao@gmail.com> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
This commit is contained in:
@@ -445,7 +445,6 @@ static void __init ep93xx_dma_clock_init(void)
|
||||
static int __init ep93xx_clock_init(void)
|
||||
{
|
||||
u32 value;
|
||||
int i;
|
||||
|
||||
value = __raw_readl(EP93XX_SYSCON_CLOCK_SET1);
|
||||
if (!(value & 0x00800000)) { /* PLL1 bypassed? */
|
||||
@@ -474,8 +473,7 @@ static int __init ep93xx_clock_init(void)
|
||||
clk_f.rate / 1000000, clk_h.rate / 1000000,
|
||||
clk_p.rate / 1000000);
|
||||
|
||||
for (i = 0; i < ARRAY_SIZE(clocks); i++)
|
||||
clkdev_add(&clocks[i]);
|
||||
clkdev_add_table(clocks, ARRAY_SIZE(clocks));
|
||||
return 0;
|
||||
}
|
||||
arch_initcall(ep93xx_clock_init);
|
||||
|
Reference in New Issue
Block a user