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>
This commit is contained in:
parent
833724afc0
commit
70ca3c4b9a
|
@ -100,7 +100,8 @@ struct xc2028_data {
|
||||||
if (size != _rc) \
|
if (size != _rc) \
|
||||||
tuner_info("i2c output error: rc = %d (should be %d)\n",\
|
tuner_info("i2c output error: rc = %d (should be %d)\n",\
|
||||||
_rc, (int)size); \
|
_rc, (int)size); \
|
||||||
msleep(priv->ctrl.msleep); \
|
if (priv->ctrl.msleep) \
|
||||||
|
msleep(priv->ctrl.msleep); \
|
||||||
_rc; \
|
_rc; \
|
||||||
})
|
})
|
||||||
|
|
||||||
|
@ -120,7 +121,8 @@ struct xc2028_data {
|
||||||
if (isize != _rc) \
|
if (isize != _rc) \
|
||||||
tuner_err("i2c input error: rc = %d (should be %d)\n", \
|
tuner_err("i2c input error: rc = %d (should be %d)\n", \
|
||||||
_rc, (int)isize); \
|
_rc, (int)isize); \
|
||||||
msleep(priv->ctrl.msleep); \
|
if (priv->ctrl.msleep) \
|
||||||
|
msleep(priv->ctrl.msleep); \
|
||||||
_rc; \
|
_rc; \
|
||||||
})
|
})
|
||||||
|
|
||||||
|
@ -131,7 +133,7 @@ struct xc2028_data {
|
||||||
(_rc = tuner_i2c_xfer_send(&priv->i2c_props, \
|
(_rc = tuner_i2c_xfer_send(&priv->i2c_props, \
|
||||||
_val, sizeof(_val)))) { \
|
_val, sizeof(_val)))) { \
|
||||||
tuner_err("Error on line %d: %d\n", __LINE__, _rc); \
|
tuner_err("Error on line %d: %d\n", __LINE__, _rc); \
|
||||||
} else \
|
} else if (priv->ctrl.msleep) \
|
||||||
msleep(priv->ctrl.msleep); \
|
msleep(priv->ctrl.msleep); \
|
||||||
_rc; \
|
_rc; \
|
||||||
})
|
})
|
||||||
|
@ -1009,7 +1011,8 @@ static int generic_set_freq(struct dvb_frontend *fe, u32 freq /* in HZ */,
|
||||||
The reset CLK is needed only with tm6000.
|
The reset CLK is needed only with tm6000.
|
||||||
Driver should work fine even if this fails.
|
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);
|
do_tuner_callback(fe, XC2028_RESET_CLK, 1);
|
||||||
|
|
||||||
msleep(10);
|
msleep(10);
|
||||||
|
|
Loading…
Reference in a new issue