]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - drivers/media/dvb/frontends/stb0899_algo.c
Merge branch 'devel' of git://git.kernel.org/pub/scm/linux/kernel/git/ycmiao/pxa...
[linux-2.6-omap-h63xx.git] / drivers / media / dvb / frontends / stb0899_algo.c
index 83dc7e12d5f0a3c8763788ab2a408032e89c00bd..2da55ec2039259d4e05e6154502e4e9068af487a 100644 (file)
@@ -31,6 +31,8 @@ inline u32 stb0899_do_div(u64 n, u32 d)
        return n;
 }
 
+#if 0
+/* These functions are currently unused */
 /*
  * stb0899_calc_srate
  * Compute symbol rate
@@ -63,6 +65,7 @@ static u32 stb0899_get_srate(struct stb0899_state *state)
 
        return stb0899_calc_srate(internal->master_clk, sfr);
 }
+#endif
 
 /*
  * stb0899_set_srate
@@ -153,7 +156,7 @@ static void stb0899_first_subrange(struct stb0899_state *state)
        }
 
        if (range > 0)
-               internal->sub_range = MIN(internal->srch_range, range);
+               internal->sub_range = min(internal->srch_range, range);
        else
                internal->sub_range = 0;
 
@@ -182,7 +185,7 @@ static enum stb0899_status stb0899_check_tmg(struct stb0899_state *state)
        timing = stb0899_read_reg(state, STB0899_RTF);
 
        if (lock >= 42) {
-               if ((lock > 48) && (ABS(timing) >= 110)) {
+               if ((lock > 48) && (abs(timing) >= 110)) {
                        internal->status = ANALOGCARRIER;
                        dprintk(state->verbose, FE_DEBUG, 1, "-->ANALOG Carrier !");
                } else {
@@ -219,7 +222,7 @@ static enum stb0899_status stb0899_search_tmg(struct stb0899_state *state)
                index++;
                derot_freq += index * internal->direction * derot_step; /* next derot zig zag position  */
 
-               if (ABS(derot_freq) > derot_limit)
+               if (abs(derot_freq) > derot_limit)
                        next_loop--;
 
                if (next_loop) {
@@ -295,7 +298,7 @@ static enum stb0899_status stb0899_search_carrier(struct stb0899_state *state)
                        last_derot_freq = derot_freq;
                        derot_freq += index * internal->direction * internal->derot_step; /* next zig zag derotator position */
 
-                       if(ABS(derot_freq) > derot_limit)
+                       if(abs(derot_freq) > derot_limit)
                                next_loop--;
 
                        if (next_loop) {
@@ -397,7 +400,7 @@ static enum stb0899_status stb0899_search_data(struct stb0899_state *state)
                if ((internal->status != CARRIEROK) || (stb0899_check_data(state) != DATAOK)) {
 
                        derot_freq += index * internal->direction * derot_step; /* next zig zag derotator position */
-                       if (ABS(derot_freq) > derot_limit)
+                       if (abs(derot_freq) > derot_limit)
                                next_loop--;
 
                        if (next_loop) {
@@ -464,7 +467,7 @@ static void next_sub_range(struct stb0899_state *state)
 
        if (internal->sub_dir > 0) {
                old_sub_range = internal->sub_range;
-               internal->sub_range = MIN((internal->srch_range / 2) -
+               internal->sub_range = min((internal->srch_range / 2) -
                                          (internal->tuner_offst + internal->sub_range / 2),
                                           internal->sub_range);
 
@@ -768,7 +771,7 @@ static long Log2Int(int number)
        int i;
 
        i = 0;
-       while ((1 << i) <= ABS(number))
+       while ((1 << i) <= abs(number))
                i++;
 
        if (number == 0)