Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 113965
b: refs/heads/master
c: bfbf2da
h: refs/heads/master
i:
  113963: d5bc045
v: v3
  • Loading branch information
Steven Toth authored and Mauro Carvalho Chehab committed Oct 12, 2008
1 parent bb75849 commit 867e544
Show file tree
Hide file tree
Showing 4 changed files with 21 additions and 9 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: 363429a089590f3f4071ebc492b3712fdcba770b
refs/heads/master: bfbf2dae30ed75bceccc6a88d2d9368694d6bf40
21 changes: 17 additions & 4 deletions trunk/drivers/media/dvb/dvb-core/dvb_frontend.c
Original file line number Diff line number Diff line change
Expand Up @@ -1104,6 +1104,13 @@ int dtv_property_process_get(struct dvb_frontend *fe, struct dtv_property *tvp,

dtv_property_dump(tvp);

/* Allow the frontend to validate incoming properties */
if (fe->ops.get_property)
r = fe->ops.get_property(fe, tvp);

if (r < 0)
return r;

switch(tvp->cmd) {
case DTV_FREQUENCY:
tvp->u.data = fe->dtv_property_cache.frequency;
Expand Down Expand Up @@ -1188,6 +1195,13 @@ int dtv_property_process_set(struct dvb_frontend *fe, struct dtv_property *tvp,
printk("%s()\n", __FUNCTION__);
dtv_property_dump(tvp);

/* Allow the frontend to validate incoming properties */
if (fe->ops.set_property)
r = fe->ops.set_property(fe, tvp);

if (r < 0)
return r;

switch(tvp->cmd) {
case DTV_CLEAR:
/* Reset a cache of data specific to the frontend here. This does
Expand Down Expand Up @@ -1331,12 +1345,12 @@ static int dvb_frontend_ioctl_properties(struct inode *inode, struct file *file,
}

for (i = 0; i < tvps->num; i++)
dtv_property_process_set(fe, tvp + i, inode, file);
err |= dtv_property_process_set(fe, tvp + i, inode, file);

if(fe->dtv_property_cache.state == DTV_TUNE) {
printk("%s() Property cache is full, tuning\n", __FUNCTION__);
}
err = 0;

} else
if(cmd == FE_GET_PROPERTY) {
printk("%s() FE_GET_PROPERTY\n", __FUNCTION__);
Expand Down Expand Up @@ -1364,14 +1378,13 @@ static int dvb_frontend_ioctl_properties(struct inode *inode, struct file *file,
}

for (i = 0; i < tvps->num; i++)
dtv_property_process_get(fe, tvp + i, inode, file);
err |= dtv_property_process_get(fe, tvp + i, inode, file);

if (copy_to_user(tvps->props, tvp, tvps->num * sizeof(struct dtv_property))) {
err = -EFAULT;
goto out;
}

err = 0;
} else
err = -EOPNOTSUPP;

Expand Down
1 change: 0 additions & 1 deletion trunk/drivers/media/dvb/dvb-core/dvb_frontend.h
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,6 @@ struct dvb_frontend_ops {

int (*set_property)(struct dvb_frontend* fe, struct dtv_property* tvp);
int (*get_property)(struct dvb_frontend* fe, struct dtv_property* tvp);
int (*set_params)(struct dvb_frontend* fe);
};

#define MAX_EVENT 8
Expand Down
6 changes: 3 additions & 3 deletions trunk/drivers/media/dvb/frontends/cx24116.c
Original file line number Diff line number Diff line change
Expand Up @@ -802,9 +802,9 @@ static int cx24116_set_property(struct dvb_frontend *fe, struct dtv_property* tv
return 0;
}

static int cx24116_set_params(struct dvb_frontend *fe)
static int cx24116_get_property(struct dvb_frontend *fe, struct dtv_property* tvp)
{
dprintk("%s(..) We were notified that a tune request may occur\n", __func__);
dprintk("%s(..)\n", __func__);
return 0;
}

Expand Down Expand Up @@ -964,7 +964,7 @@ static struct dvb_frontend_ops cx24116_ops = {
.diseqc_send_burst = cx24116_diseqc_send_burst,

.set_property = cx24116_set_property,
.set_params = cx24116_set_params,
.get_property = cx24116_get_property,
.set_frontend = cx24116_set_frontend,
};

Expand Down

0 comments on commit 867e544

Please sign in to comment.