aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMauro Carvalho Chehab <m.chehab@samsung.com>2014-05-21 12:15:17 -0400
committerMauro Carvalho Chehab <m.chehab@samsung.com>2014-05-25 16:50:14 -0400
commite5bf4a11078d4ed1fa10574ccce325cad2f067c7 (patch)
tree05e67a2ff2a3d128814bbc03f26ad18bc977fa55
parent859ae7f01237dfb024951a759087790e4d4232e1 (diff)
[media] xc5000: Don't wrap msleep()
There's absolutely no reason to wrap msleep() call here. Just rename all occurences of xc_wait() with msleep() and remove the wrapper function. Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
-rw-r--r--drivers/media/tuners/xc5000.c15
1 files changed, 5 insertions, 10 deletions
diff --git a/drivers/media/tuners/xc5000.c b/drivers/media/tuners/xc5000.c
index 94278cc5f3ef..a5dff9714836 100644
--- a/drivers/media/tuners/xc5000.c
+++ b/drivers/media/tuners/xc5000.c
@@ -293,11 +293,6 @@ static int xc5000_readreg(struct xc5000_priv *priv, u16 reg, u16 *val)
293 return 0; 293 return 0;
294} 294}
295 295
296static void xc_wait(int wait_ms)
297{
298 msleep(wait_ms);
299}
300
301static int xc5000_TunerReset(struct dvb_frontend *fe) 296static int xc5000_TunerReset(struct dvb_frontend *fe)
302{ 297{
303 struct xc5000_priv *priv = fe->tuner_priv; 298 struct xc5000_priv *priv = fe->tuner_priv;
@@ -342,7 +337,7 @@ static int xc_write_reg(struct xc5000_priv *priv, u16 regAddr, u16 i2cData)
342 /* busy flag cleared */ 337 /* busy flag cleared */
343 break; 338 break;
344 } else { 339 } else {
345 xc_wait(5); /* wait 5 ms */ 340 msleep(5); /* wait 5 ms */
346 WatchDogTimer--; 341 WatchDogTimer--;
347 } 342 }
348 } 343 }
@@ -374,7 +369,7 @@ static int xc_load_i2c_sequence(struct dvb_frontend *fe, const u8 *i2c_sequence)
374 return result; 369 return result;
375 } else if (len & 0x8000) { 370 } else if (len & 0x8000) {
376 /* WAIT command */ 371 /* WAIT command */
377 xc_wait(len & 0x7FFF); 372 msleep(len & 0x7FFF);
378 index += 2; 373 index += 2;
379 } else { 374 } else {
380 /* Send i2c data whilst ensuring individual transactions 375 /* Send i2c data whilst ensuring individual transactions
@@ -571,7 +566,7 @@ static u16 WaitForLock(struct xc5000_priv *priv)
571 while ((lockState == 0) && (watchDogCount > 0)) { 566 while ((lockState == 0) && (watchDogCount > 0)) {
572 xc_get_lock_status(priv, &lockState); 567 xc_get_lock_status(priv, &lockState);
573 if (lockState != 1) { 568 if (lockState != 1) {
574 xc_wait(5); 569 msleep(5);
575 watchDogCount--; 570 watchDogCount--;
576 } 571 }
577 } 572 }
@@ -687,7 +682,7 @@ static void xc_debug_dump(struct xc5000_priv *priv)
687 * Frame Lines needs two frame times after initial lock 682 * Frame Lines needs two frame times after initial lock
688 * before it is valid. 683 * before it is valid.
689 */ 684 */
690 xc_wait(100); 685 msleep(100);
691 686
692 xc_get_ADC_Envelope(priv, &adc_envelope); 687 xc_get_ADC_Envelope(priv, &adc_envelope);
693 dprintk(1, "*** ADC envelope (0-1023) = %d\n", adc_envelope); 688 dprintk(1, "*** ADC envelope (0-1023) = %d\n", adc_envelope);
@@ -1137,7 +1132,7 @@ fw_retry:
1137 * I2C transactions until calibration is complete. This way we 1132 * I2C transactions until calibration is complete. This way we
1138 * don't have to rely on clock stretching working. 1133 * don't have to rely on clock stretching working.
1139 */ 1134 */
1140 xc_wait(100); 1135 msleep(100);
1141 1136
1142 if (priv->init_status_supported) { 1137 if (priv->init_status_supported) {
1143 if (xc5000_readreg(priv, XREG_INIT_STATUS, &fw_ck) != 0) { 1138 if (xc5000_readreg(priv, XREG_INIT_STATUS, &fw_ck) != 0) {