aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/dvb/frontends/stv0299.c
diff options
context:
space:
mode:
authorMauro Carvalho Chehab <mchehab@redhat.com>2011-12-26 14:59:09 -0500
committerMauro Carvalho Chehab <mchehab@redhat.com>2011-12-31 07:04:45 -0500
commit5581e130ad288af745706c30de050bc2cf6e37b3 (patch)
tree5cfd5bb5c48c0dcef5de04c3acf6bd4fc4c8b713 /drivers/media/dvb/frontends/stv0299.c
parentb1e9a650104111036ac7176024c8bb685882fe02 (diff)
[media] dvb: simplify get_tune_settings() struct
In the past, dvb_frontent_parameters were passed inside the struct where get_tuner_settings should store their result. This is not needed anymore, as all parameters needed are stored already at the fe property cache. So, use it, where needed. Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/media/dvb/frontends/stv0299.c')
-rw-r--r--drivers/media/dvb/frontends/stv0299.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/drivers/media/dvb/frontends/stv0299.c b/drivers/media/dvb/frontends/stv0299.c
index 7c64d4a25a8a..92adf90581dd 100644
--- a/drivers/media/dvb/frontends/stv0299.c
+++ b/drivers/media/dvb/frontends/stv0299.c
@@ -647,14 +647,15 @@ static int stv0299_i2c_gate_ctrl(struct dvb_frontend* fe, int enable)
647static int stv0299_get_tune_settings(struct dvb_frontend* fe, struct dvb_frontend_tune_settings* fesettings) 647static int stv0299_get_tune_settings(struct dvb_frontend* fe, struct dvb_frontend_tune_settings* fesettings)
648{ 648{
649 struct stv0299_state* state = fe->demodulator_priv; 649 struct stv0299_state* state = fe->demodulator_priv;
650 struct dtv_frontend_properties *p = &fe->dtv_property_cache;
650 651
651 fesettings->min_delay_ms = state->config->min_delay_ms; 652 fesettings->min_delay_ms = state->config->min_delay_ms;
652 if (fesettings->parameters.u.qpsk.symbol_rate < 10000000) { 653 if (p->symbol_rate < 10000000) {
653 fesettings->step_size = fesettings->parameters.u.qpsk.symbol_rate / 32000; 654 fesettings->step_size = p->symbol_rate / 32000;
654 fesettings->max_drift = 5000; 655 fesettings->max_drift = 5000;
655 } else { 656 } else {
656 fesettings->step_size = fesettings->parameters.u.qpsk.symbol_rate / 16000; 657 fesettings->step_size = p->symbol_rate / 16000;
657 fesettings->max_drift = fesettings->parameters.u.qpsk.symbol_rate / 2000; 658 fesettings->max_drift = p->symbol_rate / 2000;
658 } 659 }
659 return 0; 660 return 0;
660} 661}