V4L/DVB (9453): stb0899: fix compilation warnings
authorManu Abraham <abraham.manu@gmail.com>
Fri, 25 Jan 2008 23:28:46 +0000 (20:28 -0300)
committerMauro Carvalho Chehab <mchehab@redhat.com>
Mon, 29 Dec 2008 19:53:22 +0000 (17:53 -0200)
Cleanup/Optimization:
* Fix compile warnings
* The compile warnings helped to identify 2 unnecessary I/O operations

Signed-off-by: Manu Abraham <manu@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
drivers/media/dvb/frontends/stb0899_algo.c
drivers/media/dvb/frontends/stb0899_drv.c
drivers/media/dvb/frontends/stb0899_priv.h

index f1432cb29262f5134c547382eff2407240a5613b..65bc032964b1e85d2c780df8c4e68691529600e4 100644 (file)
@@ -199,9 +199,7 @@ static enum stb0899_status stb0899_check_tmg(struct stb0899_state *state)
 
        msleep(internal->t_timing);
 
-       reg = stb0899_read_reg(state, STB0899_RTF);
-       STB0899_SETFIELD_VAL(RTF_TIMING_LOOP_FREQ, reg, 0xf2);
-       stb0899_write_reg(state, STB0899_RTF, reg);
+       stb0899_write_reg(state, STB0899_RTF, 0xf2);
        reg = stb0899_read_reg(state, STB0899_TLIR);
        lock = STB0899_GETFIELD(TLIR_TMG_LOCK_IND, reg);
        timing = stb0899_read_reg(state, STB0899_RTF);
@@ -603,9 +601,7 @@ enum stb0899_status stb0899_dvbs_algo(struct stb0899_state *state)
                cfr[0] = cfr[1] = 0;
                stb0899_write_regs(state, STB0899_CFRM, cfr, 2); /* RESET derotator frequency   */
 
-               reg = stb0899_read_reg(state, STB0899_RTF);
-               STB0899_SETFIELD_VAL(RTF_TIMING_LOOP_FREQ, reg, 0);
-               stb0899_write_reg(state, STB0899_RTF, reg);
+               stb0899_write_reg(state, STB0899_RTF, 0);
                reg = stb0899_read_reg(state, STB0899_CFD);
                STB0899_SETFIELD_VAL(CFD_ON, reg, 1);
                stb0899_write_reg(state, STB0899_CFD, reg);
index 2caa192a8e7e7029bd40dff834a7dc630fcf4734..6e7db99127496f938359d9843c7ecf70e7129fb3 100644 (file)
@@ -495,7 +495,7 @@ err:
        return status < 0 ? status : -EREMOTEIO;
 }
 
-int stb0899_write_regs(struct stb0899_state *state, unsigned int reg, u8 *data, size_t count)
+int stb0899_write_regs(struct stb0899_state *state, unsigned int reg, u8 *data, u32 count)
 {
        int ret;
        u8 buf[2 + count];
index 73790b4e345346e8d2590335adc7788b580da1ec..da7fddb4e6be53454063d8c424b3e810281ef6af 100644 (file)
@@ -242,7 +242,7 @@ extern int stb0899_read_regs(struct stb0899_state *state,
 
 extern int stb0899_write_regs(struct stb0899_state *state,
                              unsigned int reg, u8 *data,
-                             size_t count);
+                             u32 count);
 
 extern int stb0899_write_reg(struct stb0899_state *state,
                             unsigned int reg,