diff options
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); |