aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/dvb/frontends
diff options
context:
space:
mode:
authorMauro Carvalho Chehab <mchehab@redhat.com>2011-12-26 11:42:21 -0500
committerMauro Carvalho Chehab <mchehab@redhat.com>2011-12-31 06:36:10 -0500
commit16e3d13152797fc2ae66b948cd3229e9551896c3 (patch)
tree8033b3b4cea3d70ac4408f3f1b36f15c604219e7 /drivers/media/dvb/frontends
parent5f82e6b18cb48e261f0a15a7f12c843b488234a5 (diff)
[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>
Diffstat (limited to 'drivers/media/dvb/frontends')
-rw-r--r--drivers/media/dvb/frontends/s921.c19
1 files changed, 10 insertions, 9 deletions
diff --git a/drivers/media/dvb/frontends/s921.c b/drivers/media/dvb/frontends/s921.c
index 5e8f2a8749db..4c452f487cd1 100644
--- a/drivers/media/dvb/frontends/s921.c
+++ b/drivers/media/dvb/frontends/s921.c
@@ -262,9 +262,9 @@ static int s921_i2c_readreg(struct s921_state *state, u8 i2c_addr, u8 reg)
262 s921_i2c_writeregdata(state, state->config->demod_address, \ 262 s921_i2c_writeregdata(state, state->config->demod_address, \
263 regdata, ARRAY_SIZE(regdata)) 263 regdata, ARRAY_SIZE(regdata))
264 264
265static int s921_pll_tune(struct dvb_frontend *fe, 265static int s921_pll_tune(struct dvb_frontend *fe)
266 struct dvb_frontend_parameters *p)
267{ 266{
267 struct dtv_frontend_properties *p = &fe->dtv_property_cache;
268 struct s921_state *state = fe->demodulator_priv; 268 struct s921_state *state = fe->demodulator_priv;
269 int band, rc, i; 269 int band, rc, i;
270 unsigned long f_offset; 270 unsigned long f_offset;
@@ -414,9 +414,9 @@ static int s921_read_signal_strength(struct dvb_frontend *fe, u16 *strength)
414 return 0; 414 return 0;
415} 415}
416 416
417static int s921_set_frontend(struct dvb_frontend *fe, 417static int s921_set_frontend(struct dvb_frontend *fe)
418 struct dvb_frontend_parameters *p)
419{ 418{
419 struct dtv_frontend_properties *p = &fe->dtv_property_cache;
420 struct s921_state *state = fe->demodulator_priv; 420 struct s921_state *state = fe->demodulator_priv;
421 int rc; 421 int rc;
422 422
@@ -424,7 +424,7 @@ static int s921_set_frontend(struct dvb_frontend *fe,
424 424
425 /* FIXME: We don't know how to use non-auto mode */ 425 /* FIXME: We don't know how to use non-auto mode */
426 426
427 rc = s921_pll_tune(fe, p); 427 rc = s921_pll_tune(fe);
428 if (rc < 0) 428 if (rc < 0)
429 return rc; 429 return rc;
430 430
@@ -434,7 +434,7 @@ static int s921_set_frontend(struct dvb_frontend *fe,
434} 434}
435 435
436static int s921_get_frontend(struct dvb_frontend *fe, 436static int s921_get_frontend(struct dvb_frontend *fe,
437 struct dvb_frontend_parameters *p) 437 struct dtv_frontend_properties *p)
438{ 438{
439 struct s921_state *state = fe->demodulator_priv; 439 struct s921_state *state = fe->demodulator_priv;
440 440
@@ -455,7 +455,7 @@ static int s921_tune(struct dvb_frontend *fe,
455 dprintk("\n"); 455 dprintk("\n");
456 456
457 if (params != NULL) 457 if (params != NULL)
458 rc = s921_set_frontend(fe, params); 458 rc = s921_set_frontend(fe);
459 459
460 if (!(mode_flags & FE_TUNE_MODE_ONESHOT)) 460 if (!(mode_flags & FE_TUNE_MODE_ONESHOT))
461 s921_read_status(fe, status); 461 s921_read_status(fe, status);
@@ -510,6 +510,7 @@ rcor:
510EXPORT_SYMBOL(s921_attach); 510EXPORT_SYMBOL(s921_attach);
511 511
512static struct dvb_frontend_ops s921_ops = { 512static struct dvb_frontend_ops s921_ops = {
513 .delsys = { SYS_ISDBT },
513 /* Use dib8000 values per default */ 514 /* Use dib8000 values per default */
514 .info = { 515 .info = {
515 .name = "Sharp S921", 516 .name = "Sharp S921",
@@ -534,8 +535,8 @@ static struct dvb_frontend_ops s921_ops = {
534 .release = s921_release, 535 .release = s921_release,
535 536
536 .init = s921_initfe, 537 .init = s921_initfe,
537 .set_frontend_legacy = s921_set_frontend, 538 .set_frontend = s921_set_frontend,
538 .get_frontend_legacy = s921_get_frontend, 539 .get_frontend = s921_get_frontend,
539 .read_status = s921_read_status, 540 .read_status = s921_read_status,
540 .read_signal_strength = s921_read_signal_strength, 541 .read_signal_strength = s921_read_signal_strength,
541 .tune = s921_tune, 542 .tune = s921_tune,