summaryrefslogtreecommitdiffstats
path: root/arch/arm/plat-samsung/clock.c
diff options
context:
space:
mode:
authorBen Dooks <ben-linux@fluff.org>2010-01-06 01:21:38 +0900
committerBen Dooks <ben-linux@fluff.org>2010-01-15 17:10:11 +0900
commit1d9f13c49ed750260f40317629bdd66160a3ac16 (patch)
tree3804e6a3fd0f7bf3b9e2869a26de3f018bff596a /arch/arm/plat-samsung/clock.c
parentfb6e76cd2309c76d2120e013ff34ff6ab27aad88 (diff)
downloadop-kernel-dev-1d9f13c49ed750260f40317629bdd66160a3ac16.zip
op-kernel-dev-1d9f13c49ed750260f40317629bdd66160a3ac16.tar.gz
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 fa91125..9194af9 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)
return fails;
}
+/**
+ * s3c_register_clocks() - register an array of clocks
+ * @clkp: Pointer to the first clock in the array.
+ * @nr_clks: Number of clocks to register.
+ *
+ * Call s3c24xx_register_clock() on the @clkp array given, printing an
+ * error if it fails to register the clock (unlikely).
+ */
+void __initdata s3c_register_clocks(struct clk *clkp, int nr_clks)
+{
+ int ret;
+
+ for (; nr_clks > 0; nr_clks--, clkp++) {
+ ret = s3c24xx_register_clock(clkp);
+
+ if (ret < 0) {
+ printk(KERN_ERR "Failed to register clock %s (%d)\n",
+ clkp->name, ret);
+ }
+ }
+}
+
/* initalise all the clocks */
int __init s3c24xx_register_baseclocks(unsigned long xtal)
OpenPOWER on IntegriCloud