Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 294898
b: refs/heads/master
c: 32d7e63
h: refs/heads/master
v: v3
  • Loading branch information
Danny Kukawka authored and Mauro Carvalho Chehab committed Feb 13, 2012
1 parent 2772a43 commit 2a199ec
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 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: 9fa728ea35501fb5cd56880839ad867265c61822
refs/heads/master: 32d7e63c1f4f86ad18404e3f36be99c9910fae9b
9 changes: 6 additions & 3 deletions trunk/drivers/media/common/tuners/max2165.c
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,7 @@ int fixpt_div32(u32 dividend, u32 divisor, u32 *quotient, u32 *fraction)
int i;

if (0 == divisor)
return -1;
return -EINVAL;

q = dividend / divisor;
remainder = dividend - q * divisor;
Expand All @@ -194,10 +194,13 @@ static int max2165_set_rf(struct max2165_priv *priv, u32 freq)
u8 tf_ntch;
u32 t;
u32 quotient, fraction;
int ret;

/* Set PLL divider according to RF frequency */
fixpt_div32(freq / 1000, priv->config->osc_clk * 1000,
&quotient, &fraction);
ret = fixpt_div32(freq / 1000, priv->config->osc_clk * 1000,
&quotient, &fraction);
if (ret != 0)
return ret;

/* 20-bit fraction */
fraction >>= 12;
Expand Down

0 comments on commit 2a199ec

Please sign in to comment.