The patch number 9006 was added via Steven Toth <[EMAIL PROTECTED]>
to http://linuxtv.org/hg/v4l-dvb master development tree.

Kernel patches in this development tree may be modified to be backward
compatible with older kernels. Compatibility modifications will be
removed before inclusion into the mainstream Kernel

If anyone has any objections, please let us know by sending a message to:
        [EMAIL PROTECTED]

------

From: Steven Toth  <[EMAIL PROTECTED]>
S2API: Allow reliable use of old and new api on the same frontend, regardless.


Priority: normal

Signed-off-by: Steven Toth <[EMAIL PROTECTED]>


---

 linux/drivers/media/dvb/dvb-core/dvb_frontend.c |    7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff -r 0ca00da5622f -r 0878c2968528 
linux/drivers/media/dvb/dvb-core/dvb_frontend.c
--- a/linux/drivers/media/dvb/dvb-core/dvb_frontend.c   Fri Sep 12 20:49:06 
2008 +0300
+++ b/linux/drivers/media/dvb/dvb-core/dvb_frontend.c   Sat Sep 13 14:09:07 
2008 -0400
@@ -1310,8 +1310,10 @@ static int dvb_frontend_ioctl(struct ino
 
        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;
@@ -1578,8 +1580,6 @@ static int dvb_frontend_ioctl_legacy(str
        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;
@@ -1591,6 +1591,7 @@ static int dvb_frontend_ioctl_legacy(str
                                break;
                        }
 
+                       dtv_property_cache_sync(fe, &fepriv->parameters);
                        memcpy (&fepriv->parameters, parg,
                                sizeof (struct dvb_frontend_parameters));
                }


---

Patch is available at: 
http://linuxtv.org/hg/v4l-dvb/rev/0878c29685281ea1e6e4b4b0f01a515f3b6e6c61

_______________________________________________
linuxtv-commits mailing list
linuxtv-commits@linuxtv.org
http://www.linuxtv.org/cgi-bin/mailman/listinfo/linuxtv-commits

Reply via email to