]> git.kernelconcepts.de Git - karo-tx-linux.git/commitdiff
ARM: lpc32xx: convert to use clkdev_add_table()
authorRussell King <rmk+kernel@arm.linux.org.uk>
Sun, 1 Mar 2015 14:44:35 +0000 (14:44 +0000)
committerRussell King <rmk+kernel@arm.linux.org.uk>
Wed, 6 May 2015 10:58:58 +0000 (11:58 +0100)
We have always had an efficient way of registering a table of clock
lookups - it's called clkdev_add_table().  However, some people seem
to really love writing inefficient and unnecessary code.

Convert LPC32xx to use the correct interface.

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
arch/arm/mach-lpc32xx/clock.c

index dd5d6f532e8ccec2fcfc5c1fcd0e0276aa4cf0bf..661c8f4b23102368e91d7420f50b36ccdaeab2a2 100644 (file)
@@ -1238,10 +1238,7 @@ static struct clk_lookup lookups[] = {
 
 static int __init clk_init(void)
 {
-       int i;
-
-       for (i = 0; i < ARRAY_SIZE(lookups); i++)
-               clkdev_add(&lookups[i]);
+       clkdev_add_table(lookups, ARRAY_SIZE(lookups));
 
        /*
         * Setup muxed SYSCLK for HCLK PLL base -this selects the