diff options
author | Paul Walmsley <paul@pwsan.com> | 2010-05-18 20:40:24 -0400 |
---|---|---|
committer | Paul Walmsley <paul@pwsan.com> | 2010-05-20 14:31:06 -0400 |
commit | 435699db6a3d81bfd36d25150177399a4f6048d5 (patch) | |
tree | f6fa03a580c900178ea6b2b0c64e9272460d3cd3 /arch/arm/mach-omap2/clock.c | |
parent | d74b4949714741f4c58cd1801a6a92737b89a61c (diff) |
OMAP2+ clock: clean up clkt_clksel.c
This patch cleans up arch/arm/mach-omap2/clkt_clksel.c. It:
- makes several functions static that are not called outside the file;
- adds documentation;
- makes some code paths easier to read (hopefully), by breaking up
compound statements and removing redundant checks;
- converts some pr_err()s that indicate clock tree data problems into WARN()s,
so they are more likely to be noticed;
- and moves omap2_clk_round_rate() back into mach-omap2/clock.c, its proper
home, since it is not clksel-specific.
Signed-off-by: Paul Walmsley <paul@pwsan.com>
Diffstat (limited to 'arch/arm/mach-omap2/clock.c')
-rw-r--r-- | arch/arm/mach-omap2/clock.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/arch/arm/mach-omap2/clock.c b/arch/arm/mach-omap2/clock.c index a6d0b34b7990..605f531783a8 100644 --- a/arch/arm/mach-omap2/clock.c +++ b/arch/arm/mach-omap2/clock.c | |||
@@ -334,6 +334,15 @@ oce_err1: | |||
334 | return ret; | 334 | return ret; |
335 | } | 335 | } |
336 | 336 | ||
337 | /* Given a clock and a rate apply a clock specific rounding function */ | ||
338 | long omap2_clk_round_rate(struct clk *clk, unsigned long rate) | ||
339 | { | ||
340 | if (clk->round_rate) | ||
341 | return clk->round_rate(clk, rate); | ||
342 | |||
343 | return clk->rate; | ||
344 | } | ||
345 | |||
337 | /* Set the clock rate for a clock source */ | 346 | /* Set the clock rate for a clock source */ |
338 | int omap2_clk_set_rate(struct clk *clk, unsigned long rate) | 347 | int omap2_clk_set_rate(struct clk *clk, unsigned long rate) |
339 | { | 348 | { |