]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - drivers/media/dvb/frontends/af9013.c
math-emu: Fix thinko in _FP_DIV
[linux-2.6-omap-h63xx.git] / drivers / media / dvb / frontends / af9013.c
index 9f2129d544c52a2d7346fb796ecfa51c0abc9302..21c1060cf10ea3bc9f2de1ec5ca7c9c7991c33fc 100644 (file)
@@ -941,7 +941,6 @@ static int af9013_update_ber_unc(struct dvb_frontend *fe)
        u32 error_bit_count = 0;
        u32 total_bit_count = 0;
        u32 abort_packet_count = 0;
-       u64 numerator, denominator;
 
        state->ber = 0;
 
@@ -979,11 +978,8 @@ static int af9013_update_ber_unc(struct dvb_frontend *fe)
        total_bit_count = total_bit_count - abort_packet_count;
        total_bit_count = total_bit_count * 204 * 8;
 
-       if (total_bit_count) {
-               numerator = error_bit_count * 1000000000;
-               denominator = total_bit_count;
-               state->ber = numerator / denominator;
-       }
+       if (total_bit_count)
+               state->ber = error_bit_count * 1000000000 / total_bit_count;
 
        state->ucblocks += abort_packet_count;
 
@@ -1494,7 +1490,7 @@ static int af9013_download_firmware(struct af9013_state *state)
                if (i == packets)  /* set size of the last packet */
                        len = remainder;
 
-               data = (fw->data + i * FW_PACKET_MAX_DATA);
+               data = (u8 *)(fw->data + i * FW_PACKET_MAX_DATA);
                ret = af9013_write_ofsm_regs(state, addr, data, len);
                addr += FW_PACKET_MAX_DATA;
 
@@ -1504,8 +1500,6 @@ static int af9013_download_firmware(struct af9013_state *state)
                }
        }
 
-       #undef FW_PACKET_MAX_DATA
-
        /* request boot firmware */
        ret = af9013_write_reg(state, 0xe205, 1);
        if (ret)