aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/dvb-frontends
diff options
context:
space:
mode:
authorMauro Carvalho Chehab <mchehab@redhat.com>2013-04-28 10:47:47 -0400
committerMauro Carvalho Chehab <mchehab@redhat.com>2013-06-08 21:09:24 -0400
commitb72852baa0776f6ed416d54cd94b7804f0587f81 (patch)
treedeb21949f55410b7ca7d517b33821eda8ed33c74 /drivers/media/dvb-frontends
parent0fb220f2a5cb85365d1ecf11e931d57109955782 (diff)
[media] drxk_hard: use usleep_range()
X-Patchwork-Delegate: mchehab@redhat.com Fixes the following checkpatch.pl warnings: WARNING: msleep < 20ms can sleep for up to 20ms; see Documentation/timers/timers-howto.txt + msleep(10); WARNING: msleep < 20ms can sleep for up to 20ms; see Documentation/timers/timers-howto.txt + msleep(1); WARNING: msleep < 20ms can sleep for up to 20ms; see Documentation/timers/timers-howto.txt + msleep(1); WARNING: msleep < 20ms can sleep for up to 20ms; see Documentation/timers/timers-howto.txt + msleep(1); WARNING: msleep < 20ms can sleep for up to 20ms; see Documentation/timers/timers-howto.txt + msleep(1); WARNING: msleep < 20ms can sleep for up to 20ms; see Documentation/timers/timers-howto.txt + msleep(1); WARNING: msleep < 20ms can sleep for up to 20ms; see Documentation/timers/timers-howto.txt + msleep(1); WARNING: msleep < 20ms can sleep for up to 20ms; see Documentation/timers/timers-howto.txt + msleep(1); Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/media/dvb-frontends')
-rw-r--r--drivers/media/dvb-frontends/drxk_hard.c18
1 files changed, 9 insertions, 9 deletions
diff --git a/drivers/media/dvb-frontends/drxk_hard.c b/drivers/media/dvb-frontends/drxk_hard.c
index fdbe23a00478..1fd74f2ed3e2 100644
--- a/drivers/media/dvb-frontends/drxk_hard.c
+++ b/drivers/media/dvb-frontends/drxk_hard.c
@@ -505,7 +505,7 @@ static int power_up_device(struct drxk_state *state)
505 data = 0; 505 data = 0;
506 status = i2c_write(state, state->demod_address, 506 status = i2c_write(state, state->demod_address,
507 &data, 1); 507 &data, 1);
508 msleep(10); 508 usleep_range(10000, 11000);
509 retry_count++; 509 retry_count++;
510 if (status < 0) 510 if (status < 0)
511 continue; 511 continue;
@@ -1017,7 +1017,7 @@ static int hi_command(struct drxk_state *state, u16 cmd, u16 *p_result)
1017 if (status < 0) 1017 if (status < 0)
1018 goto error; 1018 goto error;
1019 if (cmd == SIO_HI_RA_RAM_CMD_RESET) 1019 if (cmd == SIO_HI_RA_RAM_CMD_RESET)
1020 msleep(1); 1020 usleep_range(1000, 2000);
1021 1021
1022 powerdown_cmd = 1022 powerdown_cmd =
1023 (bool) ((cmd == SIO_HI_RA_RAM_CMD_CONFIG) && 1023 (bool) ((cmd == SIO_HI_RA_RAM_CMD_CONFIG) &&
@@ -1030,7 +1030,7 @@ static int hi_command(struct drxk_state *state, u16 cmd, u16 *p_result)
1030 u16 wait_cmd; 1030 u16 wait_cmd;
1031 1031
1032 do { 1032 do {
1033 msleep(1); 1033 usleep_range(1000, 2000);
1034 retry_count += 1; 1034 retry_count += 1;
1035 status = read16(state, SIO_HI_RA_RAM_CMD__A, 1035 status = read16(state, SIO_HI_RA_RAM_CMD__A,
1036 &wait_cmd); 1036 &wait_cmd);
@@ -1279,7 +1279,7 @@ static int bl_chain_cmd(struct drxk_state *state,
1279 1279
1280 end = jiffies + msecs_to_jiffies(time_out); 1280 end = jiffies + msecs_to_jiffies(time_out);
1281 do { 1281 do {
1282 msleep(1); 1282 usleep_range(1000, 2000);
1283 status = read16(state, SIO_BL_STATUS__A, &bl_status); 1283 status = read16(state, SIO_BL_STATUS__A, &bl_status);
1284 if (status < 0) 1284 if (status < 0)
1285 goto error; 1285 goto error;
@@ -1392,7 +1392,7 @@ static int dvbt_enable_ofdm_token_ring(struct drxk_state *state, bool enable)
1392 status = read16(state, SIO_OFDM_SH_OFDM_RING_STATUS__A, &data); 1392 status = read16(state, SIO_OFDM_SH_OFDM_RING_STATUS__A, &data);
1393 if ((status >= 0 && data == desired_status) || time_is_after_jiffies(end)) 1393 if ((status >= 0 && data == desired_status) || time_is_after_jiffies(end))
1394 break; 1394 break;
1395 msleep(1); 1395 usleep_range(1000, 2000);
1396 } while (1); 1396 } while (1);
1397 if (data != desired_status) { 1397 if (data != desired_status) {
1398 pr_err("SIO not ready\n"); 1398 pr_err("SIO not ready\n");
@@ -1471,7 +1471,7 @@ static int scu_command(struct drxk_state *state,
1471 /* Wait until SCU has processed command */ 1471 /* Wait until SCU has processed command */
1472 end = jiffies + msecs_to_jiffies(DRXK_MAX_WAITTIME); 1472 end = jiffies + msecs_to_jiffies(DRXK_MAX_WAITTIME);
1473 do { 1473 do {
1474 msleep(1); 1474 usleep_range(1000, 2000);
1475 status = read16(state, SCU_RAM_COMMAND__A, &cur_cmd); 1475 status = read16(state, SCU_RAM_COMMAND__A, &cur_cmd);
1476 if (status < 0) 1476 if (status < 0)
1477 goto error; 1477 goto error;
@@ -3187,7 +3187,7 @@ static int dvbt_sc_command(struct drxk_state *state,
3187 /* Wait until sc is ready to receive command */ 3187 /* Wait until sc is ready to receive command */
3188 retry_cnt = 0; 3188 retry_cnt = 0;
3189 do { 3189 do {
3190 msleep(1); 3190 usleep_range(1000, 2000);
3191 status = read16(state, OFDM_SC_RA_RAM_CMD__A, &cur_cmd); 3191 status = read16(state, OFDM_SC_RA_RAM_CMD__A, &cur_cmd);
3192 retry_cnt++; 3192 retry_cnt++;
3193 } while ((cur_cmd != 0) && (retry_cnt < DRXK_MAX_RETRIES)); 3193 } while ((cur_cmd != 0) && (retry_cnt < DRXK_MAX_RETRIES));
@@ -3239,7 +3239,7 @@ static int dvbt_sc_command(struct drxk_state *state,
3239 /* Wait until sc is ready processing command */ 3239 /* Wait until sc is ready processing command */
3240 retry_cnt = 0; 3240 retry_cnt = 0;
3241 do { 3241 do {
3242 msleep(1); 3242 usleep_range(1000, 2000);
3243 status = read16(state, OFDM_SC_RA_RAM_CMD__A, &cur_cmd); 3243 status = read16(state, OFDM_SC_RA_RAM_CMD__A, &cur_cmd);
3244 retry_cnt++; 3244 retry_cnt++;
3245 } while ((cur_cmd != 0) && (retry_cnt < DRXK_MAX_RETRIES)); 3245 } while ((cur_cmd != 0) && (retry_cnt < DRXK_MAX_RETRIES));
@@ -5947,7 +5947,7 @@ static int init_drxk(struct drxk_state *state)
5947 if (status < 0) 5947 if (status < 0)
5948 goto error; 5948 goto error;
5949 /* TODO is this needed, if yes how much delay in worst case scenario */ 5949 /* TODO is this needed, if yes how much delay in worst case scenario */
5950 msleep(1); 5950 usleep_range(1000, 2000);
5951 state->m_drxk_a3_patch_code = true; 5951 state->m_drxk_a3_patch_code = true;
5952 status = get_device_capabilities(state); 5952 status = get_device_capabilities(state);
5953 if (status < 0) 5953 if (status < 0)