aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/plat-samsung/clock.c
diff options
context:
space:
mode:
authorBen Dooks <ben-linux@fluff.org>2010-01-05 11:21:38 -0500
committerBen Dooks <ben-linux@fluff.org>2010-01-15 03:10:11 -0500
commit1d9f13c49ed750260f40317629bdd66160a3ac16 (patch)
tree3804e6a3fd0f7bf3b9e2869a26de3f018bff596a /arch/arm/plat-samsung/clock.c
parentfb6e76cd2309c76d2120e013ff34ff6ab27aad88 (diff)
ARM: SAMSUNG: Add call to register array of clocks
Add s3c_register_clocks() to register an array of clocks, printing an error message if there is a problem. Replace all points in the code where this could be used. Signed-off-by: Ben Dooks <ben-linux@fluff.org>
Diffstat (limited to 'arch/arm/plat-samsung/clock.c')
-rw-r--r--arch/arm/plat-samsung/clock.c22
1 files changed, 22 insertions, 0 deletions
diff --git a/arch/arm/plat-samsung/clock.c b/arch/arm/plat-samsung/clock.c
index fa91125c7e0e..9194af91e4b7 100644
--- a/arch/arm/plat-samsung/clock.c
+++ b/arch/arm/plat-samsung/clock.c
@@ -336,6 +336,28 @@ int s3c24xx_register_clocks(struct clk **clks, int nr_clks)
336 return fails; 336 return fails;
337} 337}
338 338
339/**
340 * s3c_register_clocks() - register an array of clocks
341 * @clkp: Pointer to the first clock in the array.
342 * @nr_clks: Number of clocks to register.
343 *
344 * Call s3c24xx_register_clock() on the @clkp array given, printing an
345 * error if it fails to register the clock (unlikely).
346 */
347void __initdata s3c_register_clocks(struct clk *clkp, int nr_clks)
348{
349 int ret;
350
351 for (; nr_clks > 0; nr_clks--, clkp++) {
352 ret = s3c24xx_register_clock(clkp);
353
354 if (ret < 0) {
355 printk(KERN_ERR "Failed to register clock %s (%d)\n",
356 clkp->name, ret);
357 }
358 }
359}
360
339/* initalise all the clocks */ 361/* initalise all the clocks */
340 362
341int __init s3c24xx_register_baseclocks(unsigned long xtal) 363int __init s3c24xx_register_baseclocks(unsigned long xtal)