diff options
author | Devin Heitmueller <dheitmueller@kernellabs.com> | 2010-01-18 23:38:45 -0500 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@redhat.com> | 2010-05-17 23:43:45 -0400 |
commit | 70ca3c4b9a722b24626ffe81bdfd7d1a6824f175 (patch) | |
tree | 88252bb55dea8cca92df42b8708244cc238107b4 /drivers/media/common | |
parent | 833724afc0e60fe94da64beb9e1afd390a9948a4 (diff) |
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>
Diffstat (limited to 'drivers/media/common')
-rw-r--r-- | 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 61a7e138c748..b6ce528e1889 100644 --- a/drivers/media/common/tuners/tuner-xc2028.c +++ b/drivers/media/common/tuners/tuner-xc2028.c | |||
@@ -100,7 +100,8 @@ struct xc2028_data { | |||
100 | if (size != _rc) \ | 100 | if (size != _rc) \ |
101 | tuner_info("i2c output error: rc = %d (should be %d)\n",\ | 101 | tuner_info("i2c output error: rc = %d (should be %d)\n",\ |
102 | _rc, (int)size); \ | 102 | _rc, (int)size); \ |
103 | msleep(priv->ctrl.msleep); \ | 103 | if (priv->ctrl.msleep) \ |
104 | msleep(priv->ctrl.msleep); \ | ||
104 | _rc; \ | 105 | _rc; \ |
105 | }) | 106 | }) |
106 | 107 | ||
@@ -120,7 +121,8 @@ struct xc2028_data { | |||
120 | if (isize != _rc) \ | 121 | if (isize != _rc) \ |
121 | tuner_err("i2c input error: rc = %d (should be %d)\n", \ | 122 | tuner_err("i2c input error: rc = %d (should be %d)\n", \ |
122 | _rc, (int)isize); \ | 123 | _rc, (int)isize); \ |
123 | msleep(priv->ctrl.msleep); \ | 124 | if (priv->ctrl.msleep) \ |
125 | msleep(priv->ctrl.msleep); \ | ||
124 | _rc; \ | 126 | _rc; \ |
125 | }) | 127 | }) |
126 | 128 | ||
@@ -131,7 +133,7 @@ struct xc2028_data { | |||
131 | (_rc = tuner_i2c_xfer_send(&priv->i2c_props, \ | 133 | (_rc = tuner_i2c_xfer_send(&priv->i2c_props, \ |
132 | _val, sizeof(_val)))) { \ | 134 | _val, sizeof(_val)))) { \ |
133 | tuner_err("Error on line %d: %d\n", __LINE__, _rc); \ | 135 | tuner_err("Error on line %d: %d\n", __LINE__, _rc); \ |
134 | } else \ | 136 | } else if (priv->ctrl.msleep) \ |
135 | msleep(priv->ctrl.msleep); \ | 137 | msleep(priv->ctrl.msleep); \ |
136 | _rc; \ | 138 | _rc; \ |
137 | }) | 139 | }) |
@@ -1009,7 +1011,8 @@ static int generic_set_freq(struct dvb_frontend *fe, u32 freq /* in HZ */, | |||
1009 | The reset CLK is needed only with tm6000. | 1011 | The reset CLK is needed only with tm6000. |
1010 | Driver should work fine even if this fails. | 1012 | Driver should work fine even if this fails. |
1011 | */ | 1013 | */ |
1012 | msleep(priv->ctrl.msleep); | 1014 | if (priv->ctrl.msleep) |
1015 | msleep(priv->ctrl.msleep); | ||
1013 | do_tuner_callback(fe, XC2028_RESET_CLK, 1); | 1016 | do_tuner_callback(fe, XC2028_RESET_CLK, 1); |
1014 | 1017 | ||
1015 | msleep(10); | 1018 | msleep(10); |