[PATCH] DVB: lgdt330x check callback fix

Most of the patch is whitespace cleanup, but more importantly, this patch
checks to see whether a callback is set before calling it.  On cx88 boards
(currently the only boards using lgdt330x in 2.6.13) every callback is set.
However, newer drivers currently in development leave a callback undefined,
and lgdt330x must not call it if it isn't defined.

Signed-off-by: Patrick Boettcher <pb@linuxtv.org>
Signed-off-by: Michael Krufky <mkrufky@m1k.net>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
This commit is contained in:
Michael Krufky 2005-09-06 15:19:40 -07:00 committed by Linus Torvalds
parent 2684f5c74d
commit dc9ca2af49
1 changed files with 25 additions and 25 deletions

View File

@ -172,7 +172,6 @@ static int lgdt330x_SwReset(struct lgdt330x_state* state)
}
}
static int lgdt330x_init(struct dvb_frontend* fe)
{
/* Hardware reset is done using gpio[0] of cx23880x chip.
@ -379,17 +378,18 @@ static int lgdt330x_set_parameters(struct dvb_frontend* fe,
/* Select the requested mode */
i2c_write_demod_bytes(state, top_ctrl_cfg,
sizeof(top_ctrl_cfg));
if (state->config->set_ts_params)
state->config->set_ts_params(fe, 0);
state->current_modulation = param->u.vsb.modulation;
}
/* Change only if we are actually changing the channel */
if (state->current_frequency != param->frequency) {
/* Tune to the new frequency */
/* Tune to the specified frequency */
if (state->config->pll_set)
state->config->pll_set(fe, param);
/* Keep track of the new frequency */
state->current_frequency = param->frequency;
}
lgdt330x_SwReset(state);
return 0;
}