V4L/DVB: xc3028: fix regression in firmware loading time

Previous thread: V4L/DVB: tm6000: remove hack.c hack.h, switch to zl10353 module by Linux Kernel Mailing List on Thursday, May 20, 2010 - 11:02 am. (1 message)

Next thread: V4L/DVB: ir-rc5-decoder: fix state machine by Linux Kernel Mailing List on Thursday, May 20, 2010 - 11:04 am. (1 message)
From: Linux Kernel Mailing List
Date: Thursday, May 20, 2010 - 11:02 am

Gitweb:     http://git.kernel.org/linus/70ca3c4b9a722b24626ffe81bdfd7d1a6824f175
Commit:     70ca3c4b9a722b24626ffe81bdfd7d1a6824f175
Parent:     833724afc0e60fe94da64beb9e1afd390a9948a4
Author:     Devin Heitmueller <dheitmueller@kernellabs.com>
AuthorDate: Tue Jan 19 01:38:45 2010 -0300
Committer:  Mauro Carvalho Chehab <mchehab@redhat.com>
CommitDate: Tue May 18 00:43:45 2010 -0300

    V4L/DVB: 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.
    
    Signed-off-by: Devin Heitmueller <dheitmueller@kernellabs.com>
    Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
---
 drivers/media/common/tuners/tuner-xc2028.c |   11 +++++++----
 1 files changed, 7 insertions(+), 4 deletions(-)

diff --git a/drivers/media/common/tuners/tuner-xc2028.c b/drivers/media/common/tuners/tuner-xc2028.c
index 61a7e13..b6ce528 100644
--- a/drivers/media/common/tuners/tuner-xc2028.c
+++ b/drivers/media/common/tuners/tuner-xc2028.c
@@ -100,7 +100,8 @@ struct xc2028_data {
 	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 @@ struct xc2028_data {
 	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 @@ struct xc2028_data {
 			(_rc = ...
Previous thread: V4L/DVB: tm6000: remove hack.c hack.h, switch to zl10353 module by Linux Kernel Mailing List on Thursday, May 20, 2010 - 11:02 am. (1 message)

Next thread: V4L/DVB: ir-rc5-decoder: fix state machine by Linux Kernel Mailing List on Thursday, May 20, 2010 - 11:04 am. (1 message)