[media] s921: convert set_fontend to use DVBv5 parameters

Instead of using dvb_frontend_parameters struct, that were
designed for a subset of the supported standards, use the DVBv5
cache information.

Also, fill the supported delivery systems at dvb_frontend_ops
struct.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
This commit is contained in:
Mauro Carvalho Chehab 2011-12-26 13:42:21 -03:00
parent 5f82e6b18c
commit 16e3d13152
1 changed files with 10 additions and 9 deletions

View File

@ -262,9 +262,9 @@ static int s921_i2c_readreg(struct s921_state *state, u8 i2c_addr, u8 reg)
s921_i2c_writeregdata(state, state->config->demod_address, \ s921_i2c_writeregdata(state, state->config->demod_address, \
regdata, ARRAY_SIZE(regdata)) regdata, ARRAY_SIZE(regdata))
static int s921_pll_tune(struct dvb_frontend *fe, static int s921_pll_tune(struct dvb_frontend *fe)
struct dvb_frontend_parameters *p)
{ {
struct dtv_frontend_properties *p = &fe->dtv_property_cache;
struct s921_state *state = fe->demodulator_priv; struct s921_state *state = fe->demodulator_priv;
int band, rc, i; int band, rc, i;
unsigned long f_offset; unsigned long f_offset;
@ -414,9 +414,9 @@ static int s921_read_signal_strength(struct dvb_frontend *fe, u16 *strength)
return 0; return 0;
} }
static int s921_set_frontend(struct dvb_frontend *fe, static int s921_set_frontend(struct dvb_frontend *fe)
struct dvb_frontend_parameters *p)
{ {
struct dtv_frontend_properties *p = &fe->dtv_property_cache;
struct s921_state *state = fe->demodulator_priv; struct s921_state *state = fe->demodulator_priv;
int rc; int rc;
@ -424,7 +424,7 @@ static int s921_set_frontend(struct dvb_frontend *fe,
/* FIXME: We don't know how to use non-auto mode */ /* FIXME: We don't know how to use non-auto mode */
rc = s921_pll_tune(fe, p); rc = s921_pll_tune(fe);
if (rc < 0) if (rc < 0)
return rc; return rc;
@ -434,7 +434,7 @@ static int s921_set_frontend(struct dvb_frontend *fe,
} }
static int s921_get_frontend(struct dvb_frontend *fe, static int s921_get_frontend(struct dvb_frontend *fe,
struct dvb_frontend_parameters *p) struct dtv_frontend_properties *p)
{ {
struct s921_state *state = fe->demodulator_priv; struct s921_state *state = fe->demodulator_priv;
@ -455,7 +455,7 @@ static int s921_tune(struct dvb_frontend *fe,
dprintk("\n"); dprintk("\n");
if (params != NULL) if (params != NULL)
rc = s921_set_frontend(fe, params); rc = s921_set_frontend(fe);
if (!(mode_flags & FE_TUNE_MODE_ONESHOT)) if (!(mode_flags & FE_TUNE_MODE_ONESHOT))
s921_read_status(fe, status); s921_read_status(fe, status);
@ -510,6 +510,7 @@ rcor:
EXPORT_SYMBOL(s921_attach); EXPORT_SYMBOL(s921_attach);
static struct dvb_frontend_ops s921_ops = { static struct dvb_frontend_ops s921_ops = {
.delsys = { SYS_ISDBT },
/* Use dib8000 values per default */ /* Use dib8000 values per default */
.info = { .info = {
.name = "Sharp S921", .name = "Sharp S921",
@ -534,8 +535,8 @@ static struct dvb_frontend_ops s921_ops = {
.release = s921_release, .release = s921_release,
.init = s921_initfe, .init = s921_initfe,
.set_frontend_legacy = s921_set_frontend, .set_frontend = s921_set_frontend,
.get_frontend_legacy = s921_get_frontend, .get_frontend = s921_get_frontend,
.read_status = s921_read_status, .read_status = s921_read_status,
.read_signal_strength = s921_read_signal_strength, .read_signal_strength = s921_read_signal_strength,
.tune = s921_tune, .tune = s921_tune,