diff options
author | Mauro Carvalho Chehab <mchehab@redhat.com> | 2011-12-26 16:03:12 -0500 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@redhat.com> | 2011-12-31 07:16:32 -0500 |
commit | 41da5320df6decec7efce0d936ccadfa9deb49d1 (patch) | |
tree | f7c1e8c879909d7c283a9c76441e76d7a478f4f1 /drivers | |
parent | 7e0722215a510921cbb73ab4c37477d4dcb91bf8 (diff) |
[media] dvb: don't pass a DVBv3 parameter for search() fops
Just like the other DVB algorithms, drivers should use the DVBv5
way to retrieve parameters: via the cache struct.
Actually, several drivers were partially using the DVBv3 struct
and partially using the DVBv5 way, with is confusing and may
lead into troubles.
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/media/dvb/dvb-core/dvb_frontend.c | 2 | ||||
-rw-r--r-- | drivers/media/dvb/dvb-core/dvb_frontend.h | 2 | ||||
-rw-r--r-- | drivers/media/dvb/frontends/cxd2820r_core.c | 3 | ||||
-rw-r--r-- | drivers/media/dvb/frontends/mb86a16.c | 6 | ||||
-rw-r--r-- | drivers/media/dvb/frontends/stb0899_drv.c | 6 | ||||
-rw-r--r-- | drivers/media/dvb/frontends/stv0900_core.c | 3 | ||||
-rw-r--r-- | drivers/media/dvb/frontends/stv090x.c | 8 |
7 files changed, 14 insertions, 16 deletions
diff --git a/drivers/media/dvb/dvb-core/dvb_frontend.c b/drivers/media/dvb/dvb-core/dvb_frontend.c index caed27532ed5..c10916d27b31 100644 --- a/drivers/media/dvb/dvb-core/dvb_frontend.c +++ b/drivers/media/dvb/dvb-core/dvb_frontend.c | |||
@@ -628,7 +628,7 @@ restart: | |||
628 | */ | 628 | */ |
629 | if (fepriv->algo_status & DVBFE_ALGO_SEARCH_AGAIN) { | 629 | if (fepriv->algo_status & DVBFE_ALGO_SEARCH_AGAIN) { |
630 | if (fe->ops.search) { | 630 | if (fe->ops.search) { |
631 | fepriv->algo_status = fe->ops.search(fe, &fepriv->parameters_in); | 631 | fepriv->algo_status = fe->ops.search(fe); |
632 | /* We did do a search as was requested, the flags are | 632 | /* We did do a search as was requested, the flags are |
633 | * now unset as well and has the flags wrt to search. | 633 | * now unset as well and has the flags wrt to search. |
634 | */ | 634 | */ |
diff --git a/drivers/media/dvb/dvb-core/dvb_frontend.h b/drivers/media/dvb/dvb-core/dvb_frontend.h index c77100b21d2f..24dae26e3e2b 100644 --- a/drivers/media/dvb/dvb-core/dvb_frontend.h +++ b/drivers/media/dvb/dvb-core/dvb_frontend.h | |||
@@ -306,7 +306,7 @@ struct dvb_frontend_ops { | |||
306 | /* These callbacks are for devices that implement their own | 306 | /* These callbacks are for devices that implement their own |
307 | * tuning algorithms, rather than a simple swzigzag | 307 | * tuning algorithms, rather than a simple swzigzag |
308 | */ | 308 | */ |
309 | enum dvbfe_search (*search)(struct dvb_frontend *fe, struct dvb_frontend_parameters *p); | 309 | enum dvbfe_search (*search)(struct dvb_frontend *fe); |
310 | int (*track)(struct dvb_frontend *fe, struct dvb_frontend_parameters *p); | 310 | int (*track)(struct dvb_frontend *fe, struct dvb_frontend_parameters *p); |
311 | 311 | ||
312 | struct dvb_tuner_ops tuner_ops; | 312 | struct dvb_tuner_ops tuner_ops; |
diff --git a/drivers/media/dvb/frontends/cxd2820r_core.c b/drivers/media/dvb/frontends/cxd2820r_core.c index 56b7c2849179..0f33dfab2ef1 100644 --- a/drivers/media/dvb/frontends/cxd2820r_core.c +++ b/drivers/media/dvb/frontends/cxd2820r_core.c | |||
@@ -468,8 +468,7 @@ static int cxd2820r_get_tune_settings(struct dvb_frontend *fe, | |||
468 | return ret; | 468 | return ret; |
469 | } | 469 | } |
470 | 470 | ||
471 | static enum dvbfe_search cxd2820r_search(struct dvb_frontend *fe, | 471 | static enum dvbfe_search cxd2820r_search(struct dvb_frontend *fe) |
472 | struct dvb_frontend_parameters *p) | ||
473 | { | 472 | { |
474 | struct cxd2820r_priv *priv = fe->demodulator_priv; | 473 | struct cxd2820r_priv *priv = fe->demodulator_priv; |
475 | struct dtv_frontend_properties *c = &fe->dtv_property_cache; | 474 | struct dtv_frontend_properties *c = &fe->dtv_property_cache; |
diff --git a/drivers/media/dvb/frontends/mb86a16.c b/drivers/media/dvb/frontends/mb86a16.c index 292ba7bc0bab..45844f4016c8 100644 --- a/drivers/media/dvb/frontends/mb86a16.c +++ b/drivers/media/dvb/frontends/mb86a16.c | |||
@@ -1621,13 +1621,13 @@ err: | |||
1621 | return -EREMOTEIO; | 1621 | return -EREMOTEIO; |
1622 | } | 1622 | } |
1623 | 1623 | ||
1624 | static enum dvbfe_search mb86a16_search(struct dvb_frontend *fe, | 1624 | static enum dvbfe_search mb86a16_search(struct dvb_frontend *fe) |
1625 | struct dvb_frontend_parameters *p) | ||
1626 | { | 1625 | { |
1626 | struct dtv_frontend_properties *p = &fe->dtv_property_cache; | ||
1627 | struct mb86a16_state *state = fe->demodulator_priv; | 1627 | struct mb86a16_state *state = fe->demodulator_priv; |
1628 | 1628 | ||
1629 | state->frequency = p->frequency / 1000; | 1629 | state->frequency = p->frequency / 1000; |
1630 | state->srate = p->u.qpsk.symbol_rate / 1000; | 1630 | state->srate = p->symbol_rate / 1000; |
1631 | 1631 | ||
1632 | if (!mb86a16_set_fe(state)) { | 1632 | if (!mb86a16_set_fe(state)) { |
1633 | dprintk(verbose, MB86A16_ERROR, 1, "Successfully acquired LOCK"); | 1633 | dprintk(verbose, MB86A16_ERROR, 1, "Successfully acquired LOCK"); |
diff --git a/drivers/media/dvb/frontends/stb0899_drv.c b/drivers/media/dvb/frontends/stb0899_drv.c index 0c47a99349bb..93afc7960fb3 100644 --- a/drivers/media/dvb/frontends/stb0899_drv.c +++ b/drivers/media/dvb/frontends/stb0899_drv.c | |||
@@ -1431,7 +1431,7 @@ static void stb0899_set_iterations(struct stb0899_state *state) | |||
1431 | stb0899_write_s2reg(state, STB0899_S2FEC, STB0899_BASE_MAX_ITER, STB0899_OFF0_MAX_ITER, reg); | 1431 | stb0899_write_s2reg(state, STB0899_S2FEC, STB0899_BASE_MAX_ITER, STB0899_OFF0_MAX_ITER, reg); |
1432 | } | 1432 | } |
1433 | 1433 | ||
1434 | static enum dvbfe_search stb0899_search(struct dvb_frontend *fe, struct dvb_frontend_parameters *p) | 1434 | static enum dvbfe_search stb0899_search(struct dvb_frontend *fe) |
1435 | { | 1435 | { |
1436 | struct stb0899_state *state = fe->demodulator_priv; | 1436 | struct stb0899_state *state = fe->demodulator_priv; |
1437 | struct stb0899_params *i_params = &state->params; | 1437 | struct stb0899_params *i_params = &state->params; |
@@ -1441,8 +1441,8 @@ static enum dvbfe_search stb0899_search(struct dvb_frontend *fe, struct dvb_fron | |||
1441 | 1441 | ||
1442 | u32 SearchRange, gain; | 1442 | u32 SearchRange, gain; |
1443 | 1443 | ||
1444 | i_params->freq = p->frequency; | 1444 | i_params->freq = props->frequency; |
1445 | i_params->srate = p->u.qpsk.symbol_rate; | 1445 | i_params->srate = props->symbol_rate; |
1446 | state->delsys = props->delivery_system; | 1446 | state->delsys = props->delivery_system; |
1447 | dprintk(state->verbose, FE_DEBUG, 1, "delivery system=%d", state->delsys); | 1447 | dprintk(state->verbose, FE_DEBUG, 1, "delivery system=%d", state->delsys); |
1448 | 1448 | ||
diff --git a/drivers/media/dvb/frontends/stv0900_core.c b/drivers/media/dvb/frontends/stv0900_core.c index 3f7e62f1c823..83e9a8145318 100644 --- a/drivers/media/dvb/frontends/stv0900_core.c +++ b/drivers/media/dvb/frontends/stv0900_core.c | |||
@@ -1558,8 +1558,7 @@ static int stv0900_status(struct stv0900_internal *intp, | |||
1558 | return locked; | 1558 | return locked; |
1559 | } | 1559 | } |
1560 | 1560 | ||
1561 | static enum dvbfe_search stv0900_search(struct dvb_frontend *fe, | 1561 | static enum dvbfe_search stv0900_search(struct dvb_frontend *fe) |
1562 | struct dvb_frontend_parameters *params) | ||
1563 | { | 1562 | { |
1564 | struct stv0900_state *state = fe->demodulator_priv; | 1563 | struct stv0900_state *state = fe->demodulator_priv; |
1565 | struct stv0900_internal *intp = state->internal; | 1564 | struct stv0900_internal *intp = state->internal; |
diff --git a/drivers/media/dvb/frontends/stv090x.c b/drivers/media/dvb/frontends/stv090x.c index 574ef67fcdad..dd8ded5fc2dc 100644 --- a/drivers/media/dvb/frontends/stv090x.c +++ b/drivers/media/dvb/frontends/stv090x.c | |||
@@ -3427,17 +3427,17 @@ err: | |||
3427 | return -1; | 3427 | return -1; |
3428 | } | 3428 | } |
3429 | 3429 | ||
3430 | static enum dvbfe_search stv090x_search(struct dvb_frontend *fe, struct dvb_frontend_parameters *p) | 3430 | static enum dvbfe_search stv090x_search(struct dvb_frontend *fe) |
3431 | { | 3431 | { |
3432 | struct stv090x_state *state = fe->demodulator_priv; | 3432 | struct stv090x_state *state = fe->demodulator_priv; |
3433 | struct dtv_frontend_properties *props = &fe->dtv_property_cache; | 3433 | struct dtv_frontend_properties *props = &fe->dtv_property_cache; |
3434 | 3434 | ||
3435 | if (p->frequency == 0) | 3435 | if (props->frequency == 0) |
3436 | return DVBFE_ALGO_SEARCH_INVALID; | 3436 | return DVBFE_ALGO_SEARCH_INVALID; |
3437 | 3437 | ||
3438 | state->delsys = props->delivery_system; | 3438 | state->delsys = props->delivery_system; |
3439 | state->frequency = p->frequency; | 3439 | state->frequency = props->frequency; |
3440 | state->srate = p->u.qpsk.symbol_rate; | 3440 | state->srate = props->symbol_rate; |
3441 | state->search_mode = STV090x_SEARCH_AUTO; | 3441 | state->search_mode = STV090x_SEARCH_AUTO; |
3442 | state->algo = STV090x_COLD_SEARCH; | 3442 | state->algo = STV090x_COLD_SEARCH; |
3443 | state->fec = STV090x_PRERR; | 3443 | state->fec = STV090x_PRERR; |