Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 306383
b: refs/heads/master
c: fdf07b0
h: refs/heads/master
i:
  306381: 26d167c
  306379: 021dcb7
  306375: 556a367
  306367: 6143910
v: v3
  • Loading branch information
Hans Verkuil authored and Mauro Carvalho Chehab committed May 14, 2012
1 parent 025f2d7 commit c0f77af
Show file tree
Hide file tree
Showing 13 changed files with 28 additions and 45 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 8173090acb33500496b69ca20c7f33c3bf665958
refs/heads/master: fdf07b027b2d3eee9a561898b9c427cc3e457af4
2 changes: 0 additions & 2 deletions trunk/drivers/media/dvb/bt8xx/dst_ca.c
Original file line number Diff line number Diff line change
Expand Up @@ -477,7 +477,6 @@ static int dst_check_ca_pmt(struct dst_state *state, struct ca_msg *p_ca_message
static int ca_send_message(struct dst_state *state, struct ca_msg *p_ca_message, void __user *arg)
{
int i = 0;
unsigned int ca_message_header_len;

u32 command = 0;
struct ca_msg *hw_buffer;
Expand All @@ -496,7 +495,6 @@ static int ca_send_message(struct dst_state *state, struct ca_msg *p_ca_message,


if (p_ca_message->msg) {
ca_message_header_len = p_ca_message->length; /* Restore it back when you are done */
/* EN50221 tag */
command = 0;

Expand Down
13 changes: 5 additions & 8 deletions trunk/drivers/media/dvb/frontends/af9013.c
Original file line number Diff line number Diff line change
Expand Up @@ -514,7 +514,6 @@ static int af9013_statistics_signal_strength(struct dvb_frontend *fe)

static void af9013_statistics_work(struct work_struct *work)
{
int ret;
struct af9013_state *state = container_of(work,
struct af9013_state, statistics_work.work);
unsigned int next_msec;
Expand All @@ -530,36 +529,34 @@ static void af9013_statistics_work(struct work_struct *work)
default:
state->statistics_step = 0;
case 0:
ret = af9013_statistics_signal_strength(&state->fe);
af9013_statistics_signal_strength(&state->fe);
state->statistics_step++;
next_msec = 300;
break;
case 1:
ret = af9013_statistics_snr_start(&state->fe);
af9013_statistics_snr_start(&state->fe);
state->statistics_step++;
next_msec = 200;
break;
case 2:
ret = af9013_statistics_ber_unc_start(&state->fe);
af9013_statistics_ber_unc_start(&state->fe);
state->statistics_step++;
next_msec = 1000;
break;
case 3:
ret = af9013_statistics_snr_result(&state->fe);
af9013_statistics_snr_result(&state->fe);
state->statistics_step++;
next_msec = 400;
break;
case 4:
ret = af9013_statistics_ber_unc_result(&state->fe);
af9013_statistics_ber_unc_result(&state->fe);
state->statistics_step++;
next_msec = 100;
break;
}

schedule_delayed_work(&state->statistics_work,
msecs_to_jiffies(next_msec));

return;
}

static int af9013_get_tune_settings(struct dvb_frontend *fe,
Expand Down
7 changes: 3 additions & 4 deletions trunk/drivers/media/dvb/frontends/cx24110.c
Original file line number Diff line number Diff line change
Expand Up @@ -512,14 +512,13 @@ static int cx24110_read_snr(struct dvb_frontend* fe, u16* snr)
static int cx24110_read_ucblocks(struct dvb_frontend* fe, u32* ucblocks)
{
struct cx24110_state *state = fe->demodulator_priv;
u32 lastbyer;

if(cx24110_readreg(state,0x10)&0x40) {
/* the RS error counter has finished one counting window */
cx24110_writereg(state,0x10,0x60); /* select the byer reg */
lastbyer=cx24110_readreg(state,0x12)|
(cx24110_readreg(state,0x13)<<8)|
(cx24110_readreg(state,0x14)<<16);
cx24110_readreg(state, 0x12) |
(cx24110_readreg(state, 0x13) << 8) |
(cx24110_readreg(state, 0x14) << 16);
cx24110_writereg(state,0x10,0x70); /* select the bler reg */
state->lastbler=cx24110_readreg(state,0x12)|
(cx24110_readreg(state,0x13)<<8)|
Expand Down
3 changes: 1 addition & 2 deletions trunk/drivers/media/dvb/frontends/dib9000.c
Original file line number Diff line number Diff line change
Expand Up @@ -708,7 +708,6 @@ static u8 dib9000_mbx_count(struct dib9000_state *state, u8 risc_id, u16 attr)
static int dib9000_mbx_process(struct dib9000_state *state, u16 attr)
{
int ret = 0;
u16 tmp;

if (!state->platform.risc.fw_is_running)
return -1;
Expand All @@ -721,7 +720,7 @@ static int dib9000_mbx_process(struct dib9000_state *state, u16 attr)
if (dib9000_mbx_count(state, 1, attr)) /* 1=RiscB */
ret = dib9000_mbx_fetch_to_cache(state, attr);

tmp = dib9000_read_word_attr(state, 1229, attr); /* Clear the IRQ */
dib9000_read_word_attr(state, 1229, attr); /* Clear the IRQ */
/* if (tmp) */
/* dprintk( "cleared IRQ: %x", tmp); */
DibReleaseLock(&state->platform.risc.mbx_lock);
Expand Down
26 changes: 12 additions & 14 deletions trunk/drivers/media/dvb/frontends/it913x-fe.c
Original file line number Diff line number Diff line change
Expand Up @@ -633,10 +633,9 @@ static int it913x_fe_read_snr(struct dvb_frontend *fe, u16 *snr)
static int it913x_fe_read_ber(struct dvb_frontend *fe, u32 *ber)
{
struct it913x_fe_state *state = fe->demodulator_priv;
int ret;
u8 reg[5];
/* Read Aborted Packets and Pre-Viterbi error rate 5 bytes */
ret = it913x_read_reg(state, RSD_ABORT_PKT_LSB, reg, sizeof(reg));
it913x_read_reg(state, RSD_ABORT_PKT_LSB, reg, sizeof(reg));
state->ucblocks += (u32)(reg[1] << 8) | reg[0];
*ber = (u32)(reg[4] << 16) | (reg[3] << 8) | reg[2];
return 0;
Expand All @@ -658,10 +657,9 @@ static int it913x_fe_get_frontend(struct dvb_frontend *fe)
{
struct dtv_frontend_properties *p = &fe->dtv_property_cache;
struct it913x_fe_state *state = fe->demodulator_priv;
int ret;
u8 reg[8];

ret = it913x_read_reg(state, REG_TPSD_TX_MODE, reg, sizeof(reg));
it913x_read_reg(state, REG_TPSD_TX_MODE, reg, sizeof(reg));

if (reg[3] < 3)
p->modulation = fe_con[reg[3]];
Expand Down Expand Up @@ -691,25 +689,25 @@ static int it913x_fe_set_frontend(struct dvb_frontend *fe)
{
struct dtv_frontend_properties *p = &fe->dtv_property_cache;
struct it913x_fe_state *state = fe->demodulator_priv;
int ret, i;
int i;
u8 empty_ch, last_ch;

state->it913x_status = 0;

/* Set bw*/
ret = it913x_fe_select_bw(state, p->bandwidth_hz,
it913x_fe_select_bw(state, p->bandwidth_hz,
state->adcFrequency);

/* Training Mode Off */
ret = it913x_write_reg(state, PRO_LINK, TRAINING_MODE, 0x0);
it913x_write_reg(state, PRO_LINK, TRAINING_MODE, 0x0);

/* Clear Empty Channel */
ret = it913x_write_reg(state, PRO_DMOD, EMPTY_CHANNEL_STATUS, 0x0);
it913x_write_reg(state, PRO_DMOD, EMPTY_CHANNEL_STATUS, 0x0);

/* Clear bits */
ret = it913x_write_reg(state, PRO_DMOD, MP2IF_SYNC_LK, 0x0);
it913x_write_reg(state, PRO_DMOD, MP2IF_SYNC_LK, 0x0);
/* LED on */
ret = it913x_write_reg(state, PRO_LINK, GPIOH3_O, 0x1);
it913x_write_reg(state, PRO_LINK, GPIOH3_O, 0x1);
/* Select Band*/
if ((p->frequency >= 51000000) && (p->frequency <= 230000000))
i = 0;
Expand All @@ -720,7 +718,7 @@ static int it913x_fe_set_frontend(struct dvb_frontend *fe)
else
return -EOPNOTSUPP;

ret = it913x_write_reg(state, PRO_DMOD, FREE_BAND, i);
it913x_write_reg(state, PRO_DMOD, FREE_BAND, i);

deb_info("Frontend Set Tuner Type %02x", state->tuner_type);
switch (state->tuner_type) {
Expand All @@ -730,7 +728,7 @@ static int it913x_fe_set_frontend(struct dvb_frontend *fe)
case IT9135_60:
case IT9135_61:
case IT9135_62:
ret = it9137_set_tuner(state,
it9137_set_tuner(state,
p->bandwidth_hz, p->frequency);
break;
default:
Expand All @@ -742,9 +740,9 @@ static int it913x_fe_set_frontend(struct dvb_frontend *fe)
break;
}
/* LED off */
ret = it913x_write_reg(state, PRO_LINK, GPIOH3_O, 0x0);
it913x_write_reg(state, PRO_LINK, GPIOH3_O, 0x0);
/* Trigger ofsm */
ret = it913x_write_reg(state, PRO_DMOD, TRIGGER_OFSM, 0x0);
it913x_write_reg(state, PRO_DMOD, TRIGGER_OFSM, 0x0);
last_ch = 2;
for (i = 0; i < 40; ++i) {
empty_ch = it913x_read_reg_u8(state, EMPTY_CHANNEL_STATUS);
Expand Down
3 changes: 1 addition & 2 deletions trunk/drivers/media/dvb/frontends/lgs8gxx.c
Original file line number Diff line number Diff line change
Expand Up @@ -262,7 +262,6 @@ static int lgs8gxx_set_mode_auto(struct lgs8gxx_state *priv)

static int lgs8gxx_set_mode_manual(struct lgs8gxx_state *priv)
{
int ret = 0;
u8 t;

if (priv->config->prod == LGS8GXX_PROD_LGS8G75) {
Expand Down Expand Up @@ -296,7 +295,7 @@ static int lgs8gxx_set_mode_manual(struct lgs8gxx_state *priv)
if (priv->config->prod == LGS8GXX_PROD_LGS8913)
lgs8gxx_write_reg(priv, 0xC1, 0);

ret = lgs8gxx_read_reg(priv, 0xC5, &t);
lgs8gxx_read_reg(priv, 0xC5, &t);
t = (t & 0xE0) | 0x06;
lgs8gxx_write_reg(priv, 0xC5, t);

Expand Down
3 changes: 1 addition & 2 deletions trunk/drivers/media/dvb/frontends/m88rs2000.c
Original file line number Diff line number Diff line change
Expand Up @@ -654,7 +654,6 @@ static int m88rs2000_set_tuner(struct dvb_frontend *fe, u16 *offset)
static int m88rs2000_set_fec(struct m88rs2000_state *state,
fe_code_rate_t fec)
{
int ret;
u16 fec_set;
switch (fec) {
/* This is not confirmed kept for reference */
Expand All @@ -677,7 +676,7 @@ static int m88rs2000_set_fec(struct m88rs2000_state *state,
default:
fec_set = 0x08;
}
ret = m88rs2000_demod_write(state, 0x76, fec_set);
m88rs2000_demod_write(state, 0x76, fec_set);

return 0;
}
Expand Down
3 changes: 1 addition & 2 deletions trunk/drivers/media/dvb/frontends/stb6100.c
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,6 @@ static int stb6100_read_regs(struct stb6100_state *state, u8 regs[])
static int stb6100_read_reg(struct stb6100_state *state, u8 reg)
{
u8 regs[STB6100_NUMREGS];
int rc;

struct i2c_msg msg = {
.addr = state->config->tuner_address + reg,
Expand All @@ -167,7 +166,7 @@ static int stb6100_read_reg(struct stb6100_state *state, u8 reg)
.len = 1
};

rc = i2c_transfer(state->i2c, &msg, 1);
i2c_transfer(state->i2c, &msg, 1);

if (unlikely(reg >= STB6100_NUMREGS)) {
dprintk(verbose, FE_ERROR, 1, "Invalid register offset 0x%x", reg);
Expand Down
2 changes: 0 additions & 2 deletions trunk/drivers/media/dvb/frontends/stv0297.c
Original file line number Diff line number Diff line change
Expand Up @@ -414,7 +414,6 @@ static int stv0297_set_frontend(struct dvb_frontend *fe)
int delay;
int sweeprate;
int carrieroffset;
unsigned long starttime;
unsigned long timeout;
fe_spectral_inversion_t inversion;

Expand Down Expand Up @@ -543,7 +542,6 @@ static int stv0297_set_frontend(struct dvb_frontend *fe)
stv0297_writereg_mask(state, 0x43, 0x10, 0x10);

/* wait for WGAGC lock */
starttime = jiffies;
timeout = jiffies + msecs_to_jiffies(2000);
while (time_before(jiffies, timeout)) {
msleep(10);
Expand Down
2 changes: 0 additions & 2 deletions trunk/drivers/media/dvb/frontends/stv090x.c
Original file line number Diff line number Diff line change
Expand Up @@ -2842,7 +2842,6 @@ static int stv090x_optimize_track(struct stv090x_state *state)
{
struct dvb_frontend *fe = &state->frontend;

enum stv090x_rolloff rolloff;
enum stv090x_modcod modcod;

s32 srate, pilots, aclc, f_1, f_0, i = 0, blind_tune = 0;
Expand Down Expand Up @@ -2966,7 +2965,6 @@ static int stv090x_optimize_track(struct stv090x_state *state)
f_1 = STV090x_READ_DEMOD(state, CFR2);
f_0 = STV090x_READ_DEMOD(state, CFR1);
reg = STV090x_READ_DEMOD(state, TMGOBS);
rolloff = STV090x_GETFIELD_Px(reg, ROLLOFF_STATUS_FIELD);

if (state->algo == STV090x_BLIND_SEARCH) {
STV090x_WRITE_DEMOD(state, SFRSTEP, 0x00);
Expand Down
3 changes: 1 addition & 2 deletions trunk/drivers/media/dvb/frontends/zl10353.c
Original file line number Diff line number Diff line change
Expand Up @@ -559,7 +559,6 @@ static int zl10353_init(struct dvb_frontend *fe)
{
struct zl10353_state *state = fe->demodulator_priv;
u8 zl10353_reset_attach[6] = { 0x50, 0x03, 0x64, 0x46, 0x15, 0x0F };
int rc = 0;

if (debug_regs)
zl10353_dump_regs(fe);
Expand All @@ -573,7 +572,7 @@ static int zl10353_init(struct dvb_frontend *fe)
/* Do a "hard" reset if not already done */
if (zl10353_read_register(state, 0x50) != zl10353_reset_attach[1] ||
zl10353_read_register(state, 0x51) != zl10353_reset_attach[2]) {
rc = zl10353_write(fe, zl10353_reset_attach,
zl10353_write(fe, zl10353_reset_attach,
sizeof(zl10353_reset_attach));
if (debug_regs)
zl10353_dump_regs(fe);
Expand Down
4 changes: 2 additions & 2 deletions trunk/drivers/media/dvb/siano/smssdio.c
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ static int smssdio_sendrequest(void *context, void *buffer, size_t size)

static void smssdio_interrupt(struct sdio_func *func)
{
int ret, isr;
int ret;

struct smssdio_device *smsdev;
struct smscore_buffer_t *cb;
Expand All @@ -127,7 +127,7 @@ static void smssdio_interrupt(struct sdio_func *func)
* The interrupt register has no defined meaning. It is just
* a way of turning of the level triggered interrupt.
*/
isr = sdio_readb(func, SMSSDIO_INT, &ret);
(void)sdio_readb(func, SMSSDIO_INT, &ret);
if (ret) {
sms_err("Unable to read interrupt register!\n");
return;
Expand Down

0 comments on commit c0f77af

Please sign in to comment.