提交 85eabac4 编写于 作者: M Manu Abraham 提交者: Mauro Carvalho Chehab

V4L/DVB (9453): stb0899: fix compilation warnings

Cleanup/Optimization:
* Fix compile warnings
* The compile warnings helped to identify 2 unnecessary I/O operations
Signed-off-by: NManu Abraham <manu@linuxtv.org>
Signed-off-by: NMauro Carvalho Chehab <mchehab@redhat.com>
上级 d6812086
...@@ -199,9 +199,7 @@ static enum stb0899_status stb0899_check_tmg(struct stb0899_state *state) ...@@ -199,9 +199,7 @@ static enum stb0899_status stb0899_check_tmg(struct stb0899_state *state)
msleep(internal->t_timing); msleep(internal->t_timing);
reg = stb0899_read_reg(state, STB0899_RTF); stb0899_write_reg(state, STB0899_RTF, 0xf2);
STB0899_SETFIELD_VAL(RTF_TIMING_LOOP_FREQ, reg, 0xf2);
stb0899_write_reg(state, STB0899_RTF, reg);
reg = stb0899_read_reg(state, STB0899_TLIR); reg = stb0899_read_reg(state, STB0899_TLIR);
lock = STB0899_GETFIELD(TLIR_TMG_LOCK_IND, reg); lock = STB0899_GETFIELD(TLIR_TMG_LOCK_IND, reg);
timing = stb0899_read_reg(state, STB0899_RTF); timing = stb0899_read_reg(state, STB0899_RTF);
...@@ -603,9 +601,7 @@ enum stb0899_status stb0899_dvbs_algo(struct stb0899_state *state) ...@@ -603,9 +601,7 @@ enum stb0899_status stb0899_dvbs_algo(struct stb0899_state *state)
cfr[0] = cfr[1] = 0; cfr[0] = cfr[1] = 0;
stb0899_write_regs(state, STB0899_CFRM, cfr, 2); /* RESET derotator frequency */ stb0899_write_regs(state, STB0899_CFRM, cfr, 2); /* RESET derotator frequency */
reg = stb0899_read_reg(state, STB0899_RTF); stb0899_write_reg(state, STB0899_RTF, 0);
STB0899_SETFIELD_VAL(RTF_TIMING_LOOP_FREQ, reg, 0);
stb0899_write_reg(state, STB0899_RTF, reg);
reg = stb0899_read_reg(state, STB0899_CFD); reg = stb0899_read_reg(state, STB0899_CFD);
STB0899_SETFIELD_VAL(CFD_ON, reg, 1); STB0899_SETFIELD_VAL(CFD_ON, reg, 1);
stb0899_write_reg(state, STB0899_CFD, reg); stb0899_write_reg(state, STB0899_CFD, reg);
......
...@@ -495,7 +495,7 @@ int stb0899_read_regs(struct stb0899_state *state, unsigned int reg, u8 *buf, si ...@@ -495,7 +495,7 @@ int stb0899_read_regs(struct stb0899_state *state, unsigned int reg, u8 *buf, si
return status < 0 ? status : -EREMOTEIO; 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; int ret;
u8 buf[2 + count]; u8 buf[2 + count];
......
...@@ -242,7 +242,7 @@ extern int stb0899_read_regs(struct stb0899_state *state, ...@@ -242,7 +242,7 @@ extern int stb0899_read_regs(struct stb0899_state *state,
extern int stb0899_write_regs(struct stb0899_state *state, extern int stb0899_write_regs(struct stb0899_state *state,
unsigned int reg, u8 *data, unsigned int reg, u8 *data,
size_t count); u32 count);
extern int stb0899_write_reg(struct stb0899_state *state, extern int stb0899_write_reg(struct stb0899_state *state,
unsigned int reg, unsigned int reg,
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册