diff options
author | Steven Toth <stoth@linuxtv.org> | 2008-09-13 14:09:07 -0400 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@redhat.com> | 2008-10-12 07:37:05 -0400 |
commit | 4dd88bec368a6e4caa86a511f7adbc4c08992c5c (patch) | |
tree | 6fd6ff1bc948b86c18b31c114ee33e1577ebd9f6 /drivers/media/dvb/dvb-core | |
parent | e6f9ec86575358309cf9d4b2643df2f3b1f6f9fa (diff) |
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>
Diffstat (limited to 'drivers/media/dvb/dvb-core')
-rw-r--r-- | drivers/media/dvb/dvb-core/dvb_frontend.c | 7 |
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 161ebcf9258..6b914f9a03c 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, | |||
1299 | 1299 | ||
1300 | if ((cmd == FE_SET_PROPERTY) || (cmd == FE_GET_PROPERTY)) | 1300 | if ((cmd == FE_SET_PROPERTY) || (cmd == FE_GET_PROPERTY)) |
1301 | err = dvb_frontend_ioctl_properties(inode, file, cmd, parg); | 1301 | err = dvb_frontend_ioctl_properties(inode, file, cmd, parg); |
1302 | else | 1302 | else { |
1303 | fe->dtv_property_cache.state = DTV_UNDEFINED; | ||
1303 | err = dvb_frontend_ioctl_legacy(inode, file, cmd, parg); | 1304 | err = dvb_frontend_ioctl_legacy(inode, file, cmd, parg); |
1305 | } | ||
1304 | 1306 | ||
1305 | up(&fepriv->sem); | 1307 | up(&fepriv->sem); |
1306 | return err; | 1308 | return err; |
@@ -1567,8 +1569,6 @@ static int dvb_frontend_ioctl_legacy(struct inode *inode, struct file *file, | |||
1567 | case FE_SET_FRONTEND: { | 1569 | case FE_SET_FRONTEND: { |
1568 | struct dvb_frontend_tune_settings fetunesettings; | 1570 | struct dvb_frontend_tune_settings fetunesettings; |
1569 | 1571 | ||
1570 | dtv_property_cache_sync(fe, &fepriv->parameters); | ||
1571 | |||
1572 | if(fe->dtv_property_cache.state == DTV_TUNE) { | 1572 | if(fe->dtv_property_cache.state == DTV_TUNE) { |
1573 | if (dvb_frontend_check_parameters(fe, &fepriv->parameters) < 0) { | 1573 | if (dvb_frontend_check_parameters(fe, &fepriv->parameters) < 0) { |
1574 | err = -EINVAL; | 1574 | err = -EINVAL; |
@@ -1580,6 +1580,7 @@ static int dvb_frontend_ioctl_legacy(struct inode *inode, struct file *file, | |||
1580 | break; | 1580 | break; |
1581 | } | 1581 | } |
1582 | 1582 | ||
1583 | dtv_property_cache_sync(fe, &fepriv->parameters); | ||
1583 | memcpy (&fepriv->parameters, parg, | 1584 | memcpy (&fepriv->parameters, parg, |
1584 | sizeof (struct dvb_frontend_parameters)); | 1585 | sizeof (struct dvb_frontend_parameters)); |
1585 | } | 1586 | } |