Skip to content

Commit

Permalink
ARM: SAMSUNG: Fix clksrc-clk's checks for bad register settings
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Ben Dooks committed Jan 18, 2010
1 parent b8792db commit f3b464c
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions arch/arm/plat-samsung/clock-clksrc.c
Original file line number Diff line number Diff line change
Expand Up @@ -177,9 +177,11 @@ void __init s3c_register_clksrc(struct clksrc_clk *clksrc, int size)
{
int ret;

WARN_ON(!clksrc->reg_div.reg && !clksrc->reg_src.reg);

for (; size > 0; size--, clksrc++) {
if (!clksrc->reg_div.reg && !clksrc->reg_src.reg)
printk(KERN_ERR "%s: clock %s has no registers set\n",
__func__, clksrc->clk.name);

/* fill in the default functions */

if (!clksrc->clk.ops) {
Expand Down

0 comments on commit f3b464c

Please sign in to comment.