Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 350727
b: refs/heads/master
c: 58eb5a6
h: refs/heads/master
i:
  350725: bc3850b
  350723: 732ca98
  350719: 15e90ca
v: v3
  • Loading branch information
Tony Prisk authored and Mike Turquette committed Jan 16, 2013
1 parent efe5f8e commit 717ba35
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 3 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 72480014b86c8b51fb51c5c6a0525876055c37c7
refs/heads/master: 58eb5a6763deab71208fbff15b09055fac884b11
14 changes: 12 additions & 2 deletions trunk/drivers/clk/clk-vt8500.c
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,12 @@ static long vt8500_dclk_round_rate(struct clk_hw *hw, unsigned long rate,
unsigned long *prate)
{
struct clk_device *cdev = to_clk_device(hw);
u32 divisor = *prate / rate;
u32 divisor;

if (rate == 0)
return 0;

divisor = *prate / rate;

/* If prate / rate would be decimal, incr the divisor */
if (rate * divisor < *prate)
Expand All @@ -142,9 +147,14 @@ static int vt8500_dclk_set_rate(struct clk_hw *hw, unsigned long rate,
unsigned long parent_rate)
{
struct clk_device *cdev = to_clk_device(hw);
u32 divisor = parent_rate / rate;
u32 divisor;
unsigned long flags = 0;

if (rate == 0)
return 0;

divisor = parent_rate / rate;

/* If prate / rate would be decimal, incr the divisor */
if (rate * divisor < *prate)
divisor++;
Expand Down

0 comments on commit 717ba35

Please sign in to comment.