Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 250325
b: refs/heads/master
c: bbe880b
h: refs/heads/master
i:
  250323: 029901b
v: v3
  • Loading branch information
Andreas Oberritter authored and Mauro Carvalho Chehab committed May 20, 2011
1 parent f6d469c commit a4ed0f9
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 5 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: a5959dbea37973a2440eeba39fba32c79d862ec2
refs/heads/master: bbe880b4a7c66ba14b67ee7acfbaaaa1c7be2d03
19 changes: 15 additions & 4 deletions trunk/drivers/media/dvb/dvb-core/dvb_frontend.c
Original file line number Diff line number Diff line change
Expand Up @@ -1023,10 +1023,9 @@ static int is_legacy_delivery_system(fe_delivery_system_t s)
* it's being used for the legacy or new API, reducing code and complexity.
*/
static void dtv_property_cache_sync(struct dvb_frontend *fe,
struct dvb_frontend_parameters *p)
struct dtv_frontend_properties *c,
const struct dvb_frontend_parameters *p)
{
struct dtv_frontend_properties *c = &fe->dtv_property_cache;

c->frequency = p->frequency;
c->inversion = p->inversion;

Expand Down Expand Up @@ -1200,8 +1199,20 @@ static int dtv_property_process_get(struct dvb_frontend *fe,
struct file *file)
{
const struct dtv_frontend_properties *c = &fe->dtv_property_cache;
struct dvb_frontend_private *fepriv = fe->frontend_priv;
struct dtv_frontend_properties cdetected;
int r;

/*
* If the driver implements a get_frontend function, then convert
* detected parameters to S2API properties.
*/
if (fe->ops.get_frontend) {
cdetected = *c;
dtv_property_cache_sync(fe, &cdetected, &fepriv->parameters_out);
c = &cdetected;
}

switch(tvp->cmd) {
case DTV_FREQUENCY:
tvp->u.data = c->frequency;
Expand Down Expand Up @@ -1812,7 +1823,7 @@ static int dvb_frontend_ioctl_legacy(struct file *file,

memcpy (&fepriv->parameters_in, parg,
sizeof (struct dvb_frontend_parameters));
dtv_property_cache_sync(fe, &fepriv->parameters_in);
dtv_property_cache_sync(fe, c, &fepriv->parameters_in);
}

memset(&fetunesettings, 0, sizeof(struct dvb_frontend_tune_settings));
Expand Down

0 comments on commit a4ed0f9

Please sign in to comment.