summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSteven Toth <stoth@linuxtv.org>2008-09-13 20:09:07 +0200
committerMauro Carvalho Chehab <mchehab@redhat.com>2008-10-12 13:37:05 +0200
commit4dd88bec368a6e4caa86a511f7adbc4c08992c5c (patch)
tree6fd6ff1bc948b86c18b31c114ee33e1577ebd9f6
parentV4L/DVB (9005): Bug fix: ioctl FE_SET_PROPERTY/FE_GET_PROPERTY always return ... (diff)
downloadlinux-4dd88bec368a6e4caa86a511f7adbc4c08992c5c.tar.xz
linux-4dd88bec368a6e4caa86a511f7adbc4c08992c5c.zip
V4L/DVB (9006): S2API: Allow reliable use of old and new api on the same frontend, regardless.
Signed-off-by: Steven Toth <stoth@linuxtv.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
-rw-r--r--drivers/media/dvb/dvb-core/dvb_frontend.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/drivers/media/dvb/dvb-core/dvb_frontend.c b/drivers/media/dvb/dvb-core/dvb_frontend.c
index 161ebcf9258a..6b914f9a03c5 100644
--- a/drivers/media/dvb/dvb-core/dvb_frontend.c
+++ b/drivers/media/dvb/dvb-core/dvb_frontend.c
@@ -1299,8 +1299,10 @@ static int dvb_frontend_ioctl(struct inode *inode, struct file *file,
if ((cmd == FE_SET_PROPERTY) || (cmd == FE_GET_PROPERTY))
err = dvb_frontend_ioctl_properties(inode, file, cmd, parg);
- else
+ else {
+ fe->dtv_property_cache.state = DTV_UNDEFINED;
err = dvb_frontend_ioctl_legacy(inode, file, cmd, parg);
+ }
up(&fepriv->sem);
return err;
@@ -1567,8 +1569,6 @@ static int dvb_frontend_ioctl_legacy(struct inode *inode, struct file *file,
case FE_SET_FRONTEND: {
struct dvb_frontend_tune_settings fetunesettings;
- dtv_property_cache_sync(fe, &fepriv->parameters);
-
if(fe->dtv_property_cache.state == DTV_TUNE) {
if (dvb_frontend_check_parameters(fe, &fepriv->parameters) < 0) {
err = -EINVAL;
@@ -1580,6 +1580,7 @@ static int dvb_frontend_ioctl_legacy(struct inode *inode, struct file *file,
break;
}
+ dtv_property_cache_sync(fe, &fepriv->parameters);
memcpy (&fepriv->parameters, parg,
sizeof (struct dvb_frontend_parameters));
}