aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/plat-samsung/clock-clksrc.c
diff options
context:
space:
mode:
authorBen Dooks <ben-linux@fluff.org>2010-01-18 01:37:25 -0500
committerBen Dooks <ben-linux@fluff.org>2010-01-18 01:37:25 -0500
commitf3b464cca94c4a8f54fbc11ec5af8b143fd1750b (patch)
tree8bc976f445c0bfdc85336eadb84e1c06279e3736 /arch/arm/plat-samsung/clock-clksrc.c
parentb8792dbff6ed93c5a77f71917d4a0c5efa12eee1 (diff)
ARM: SAMSUNG: Fix clksrc-clk's checks for bad register settings
The WARN_ON() was only checking the first clock in the array, instead of being executed for each clksrc clock being registered. Since this is an array of clocks, WARN_ON() does not provide a lot of useful information about the problem, so change to using printk(KERN_ERR) to report the problem to the console. As a note, we still try and register the clock even if these problems are present just in case and to avoid changing the behaviour of the registration process. Signed-off-by: Ben Dooks <ben-linux@fluff.org>
Diffstat (limited to 'arch/arm/plat-samsung/clock-clksrc.c')
-rw-r--r--arch/arm/plat-samsung/clock-clksrc.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/arch/arm/plat-samsung/clock-clksrc.c b/arch/arm/plat-samsung/clock-clksrc.c
index 98c6b8859f49..656c70e0400a 100644
--- a/arch/arm/plat-samsung/clock-clksrc.c
+++ b/arch/arm/plat-samsung/clock-clksrc.c
@@ -177,9 +177,11 @@ void __init s3c_register_clksrc(struct clksrc_clk *clksrc, int size)
177{ 177{
178 int ret; 178 int ret;
179 179
180 WARN_ON(!clksrc->reg_div.reg && !clksrc->reg_src.reg);
181
182 for (; size > 0; size--, clksrc++) { 180 for (; size > 0; size--, clksrc++) {
181 if (!clksrc->reg_div.reg && !clksrc->reg_src.reg)
182 printk(KERN_ERR "%s: clock %s has no registers set\n",
183 __func__, clksrc->clk.name);
184
183 /* fill in the default functions */ 185 /* fill in the default functions */
184 186
185 if (!clksrc->clk.ops) { 187 if (!clksrc->clk.ops) {