summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--linux/drivers/media/dvb/frontends/at76c651.c17
1 files changed, 1 insertions, 16 deletions
diff --git a/linux/drivers/media/dvb/frontends/at76c651.c b/linux/drivers/media/dvb/frontends/at76c651.c
index 28fac791d..ddcb99cc5 100644
--- a/linux/drivers/media/dvb/frontends/at76c651.c
+++ b/linux/drivers/media/dvb/frontends/at76c651.c
@@ -61,21 +61,6 @@ static int debug;
} while (0)
-#if ! defined(__powerpc__)
-static __inline__ int __ilog2(unsigned long x)
-{
- int i;
-
- if (x == 0)
- return -1;
-
- for (i = 0; x != 0; i++)
- x >>= 1;
-
- return i - 1;
-}
-#endif
-
static int at76c651_writereg(struct at76c651_state* state, u8 reg, u8 data)
{
int ret;
@@ -183,7 +168,7 @@ static int at76c651_set_symbol_rate(struct at76c651_state* state, u32 symbol_rat
* mantissa = (symbol_rate / FREF) * (1 << (30 - exponent))
*/
- exponent = __ilog2((symbol_rate << 4) / 903125);
+ exponent = long_log2((symbol_rate << 4) / 903125);
mantissa = ((symbol_rate / 3125) * (1 << (24 - exponent))) / 289;
at76c651_writereg(state, 0x00, mantissa >> 13);