Thread (52 messages) 52 messages, 2 authors, 2011-02-21

[PATCH v2 15/21] ARM: tegra: clock: Round rate before setting rate

From: Olof Johansson <hidden>
Date: 2011-02-21 04:19:55
Also in: linux-tegra, lkml

Hi,

On Sat, Feb 19, 2011 at 2:26 PM, Colin Cross [off-list ref] wrote:
quoted hunk ↗ jump to hunk
diff --git a/arch/arm/mach-tegra/clock.c b/arch/arm/mach-tegra/clock.c
index 8d01a49..9798585 100644
--- a/arch/arm/mach-tegra/clock.c
+++ b/arch/arm/mach-tegra/clock.c
@@ -86,6 +86,7 @@ static unsigned long clk_predict_rate_from_parent(struct clk *c, struct clk *p)
? ? ? ?if (c->mul != 0 && c->div != 0) {
? ? ? ? ? ? ? ?rate *= c->mul;
+ ? ? ? ? ? ? ? rate += c->div / 2; /* round up */
Shouldn't this be "rate += c->div - 1;"?



-Olof
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help