Skip to content

Commit

Permalink
[media] dvb: get rid of fepriv->parameters_in
Browse files Browse the repository at this point in the history
This var were used during DVBv3 times, in order to keep a copy
of the parameters used by the events. This is not needed anymore,
as the parameters are now dynamically generated from the DVBv5
structure.

So, just get rid of it. That means that a DVBv5 pure call won't
use anymore any DVBv3 parameters.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
  • Loading branch information
Mauro Carvalho Chehab committed Jan 4, 2012
1 parent a520ca9 commit e399ce7
Showing 1 changed file with 2 additions and 25 deletions.
27 changes: 2 additions & 25 deletions drivers/media/dvb/dvb-core/dvb_frontend.c
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,6 @@ struct dvb_frontend_private {

/* thread/frontend values */
struct dvb_device *dvbdev;
struct dvb_frontend_parameters parameters_in;
struct dvb_frontend_parameters parameters_out;
struct dvb_fe_events events;
struct semaphore sem;
Expand Down Expand Up @@ -696,7 +695,6 @@ static int dvb_frontend_thread(void *data)
fepriv->algo_status |= DVBFE_ALGO_SEARCH_AGAIN;
fepriv->delay = HZ / 2;
}
fepriv->parameters_out = fepriv->parameters_in;
fe->ops.read_status(fe, &s);
if (s != fepriv->status) {
dvb_frontend_add_event(fe, s); /* update event list */
Expand Down Expand Up @@ -1561,8 +1559,6 @@ static int dtv_property_process_set(struct dvb_frontend *fe,
{
int r = 0;
struct dtv_frontend_properties *c = &fe->dtv_property_cache;
struct dvb_frontend_private *fepriv = fe->frontend_priv;
dtv_property_dump(tvp);

/* Allow the frontend to validate incoming properties */
if (fe->ops.set_property) {
Expand All @@ -1587,9 +1583,6 @@ static int dtv_property_process_set(struct dvb_frontend *fe,
c->state = tvp->cmd;
dprintk("%s() Finalised property cache\n", __func__);

/* Needed, due to status update */
dtv_property_legacy_params_sync(fe, &fepriv->parameters_in);

r = dtv_set_frontend(fe);
break;
case DTV_FREQUENCY:
Expand Down Expand Up @@ -1850,15 +1843,6 @@ static int dtv_set_frontend(struct dvb_frontend *fe)
if (dvb_frontend_check_parameters(fe) < 0)
return -EINVAL;

/*
* Initialize output parameters to match the values given by
* the user. FE_SET_FRONTEND triggers an initial frontend event
* with status = 0, which copies output parameters to userspace.
*
* This is still needed for DVBv5 calls, due to event state update.
*/
fepriv->parameters_out = fepriv->parameters_in;

/*
* Be sure that the bandwidth will be filled for all
* non-satellite systems, as tuners need to know what
Expand Down Expand Up @@ -2173,15 +2157,11 @@ static int dvb_frontend_ioctl_legacy(struct file *file,
break;

case FE_SET_FRONTEND:
/* Synchronise DVBv5 parameters from DVBv3 */
memcpy (&fepriv->parameters_in, parg,
sizeof (struct dvb_frontend_parameters));

err = set_delivery_system(fe, SYS_UNDEFINED);
if (err)
break;

err = dtv_property_cache_sync(fe, c, &fepriv->parameters_in);
err = dtv_property_cache_sync(fe, c, parg);
if (err)
break;
err = dtv_set_frontend(fe);
Expand All @@ -2191,10 +2171,7 @@ static int dvb_frontend_ioctl_legacy(struct file *file,
break;

case FE_GET_FRONTEND:
err = dtv_get_frontend(fe, &fepriv->parameters_out);
if (err >= 0)
memcpy(parg, &fepriv->parameters_out,
sizeof(struct dvb_frontend_parameters));
err = dtv_get_frontend(fe, parg);
break;

case FE_SET_FRONTEND_TUNE_MODE:
Expand Down

0 comments on commit e399ce7

Please sign in to comment.