The patch number 14015 was added via Devin Heitmueller 
<dheitmuel...@kernellabs.com>
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:
        Linux Media Mailing List <linux-me...@vger.kernel.org>

------

From: Devin Heitmueller  <dheitmuel...@kernellabs.com>
xc3028: fix regression in firmware loading time


Fix a regression in the firmware loading time where it went from 1080 ms to
4700 ms.  This was noticed when the em28xx based HVR-950 took noticably longer
to load the driver.

Regression introduced in hg 12824.  The developer added an msleep() call with
an argument based on a newly introduced xc3028_ctrl field, which is left
initialized to zero for pretty much every board that is currently supported.

Priority: high

Signed-off-by: Devin Heitmueller <dheitmuel...@kernellabs.com>


---

 linux/drivers/media/common/tuners/tuner-xc2028.c |   11 +++++++----
 1 file changed, 7 insertions(+), 4 deletions(-)

diff -r cdcf089168df -r b7b20f1e304d 
linux/drivers/media/common/tuners/tuner-xc2028.c
--- a/linux/drivers/media/common/tuners/tuner-xc2028.c  Sun Jan 17 20:42:47 
2010 -0200
+++ b/linux/drivers/media/common/tuners/tuner-xc2028.c  Mon Jan 18 23:38:45 
2010 -0500
@@ -100,7 +100,8 @@
        if (size != _rc)                                                \
                tuner_info("i2c output error: rc = %d (should be %d)\n",\
                           _rc, (int)size);                             \
-       msleep(priv->ctrl.msleep);                                      \
+       if (priv->ctrl.msleep)                                          \
+               msleep(priv->ctrl.msleep);                              \
        _rc;                                                            \
 })
 
@@ -120,7 +121,8 @@
        if (isize != _rc)                                               \
                tuner_err("i2c input error: rc = %d (should be %d)\n",  \
                           _rc, (int)isize);                            \
-       msleep(priv->ctrl.msleep);                                      \
+       if (priv->ctrl.msleep)                                          \
+               msleep(priv->ctrl.msleep);                              \
        _rc;                                                            \
 })
 
@@ -131,7 +133,7 @@
                        (_rc = tuner_i2c_xfer_send(&priv->i2c_props,    \
                                                _val, sizeof(_val)))) { \
                tuner_err("Error on line %d: %d\n", __LINE__, _rc);     \
-       } else                                                          \
+       } else if (priv->ctrl.msleep)                                   \
                msleep(priv->ctrl.msleep);                              \
        _rc;                                                            \
 })
@@ -971,7 +973,8 @@
           The reset CLK is needed only with tm6000.
           Driver should work fine even if this fails.
         */
-       msleep(priv->ctrl.msleep);
+       if (priv->ctrl.msleep)
+               msleep(priv->ctrl.msleep);
        do_tuner_callback(fe, XC2028_RESET_CLK, 1);
 
        msleep(10);


---

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

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

Reply via email to