aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/parport/ieee1284.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/parport/ieee1284.c')
-rw-r--r--drivers/parport/ieee1284.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/drivers/parport/ieee1284.c b/drivers/parport/ieee1284.c
index 694bae162fed..5b887ba5aaf9 100644
--- a/drivers/parport/ieee1284.c
+++ b/drivers/parport/ieee1284.c
@@ -196,7 +196,7 @@ int parport_wait_peripheral(struct parport *port,
196 return 1; 196 return 1;
197 197
198 /* 40ms of slow polling. */ 198 /* 40ms of slow polling. */
199 deadline = jiffies + (HZ + 24) / 25; 199 deadline = jiffies + msecs_to_jiffies(40);
200 while (time_before (jiffies, deadline)) { 200 while (time_before (jiffies, deadline)) {
201 int ret; 201 int ret;
202 202
@@ -205,7 +205,7 @@ int parport_wait_peripheral(struct parport *port,
205 205
206 /* Wait for 10ms (or until an interrupt occurs if 206 /* Wait for 10ms (or until an interrupt occurs if
207 * the handler is set) */ 207 * the handler is set) */
208 if ((ret = parport_wait_event (port, (HZ + 99) / 100)) < 0) 208 if ((ret = parport_wait_event (port, msecs_to_jiffies(10))) < 0)
209 return ret; 209 return ret;
210 210
211 status = parport_read_status (port); 211 status = parport_read_status (port);
@@ -216,8 +216,7 @@ int parport_wait_peripheral(struct parport *port,
216 /* parport_wait_event didn't time out, but the 216 /* parport_wait_event didn't time out, but the
217 * peripheral wasn't actually ready either. 217 * peripheral wasn't actually ready either.
218 * Wait for another 10ms. */ 218 * Wait for another 10ms. */
219 __set_current_state (TASK_INTERRUPTIBLE); 219 schedule_timeout_interruptible(msecs_to_jiffies(10));
220 schedule_timeout ((HZ+ 99) / 100);
221 } 220 }
222 } 221 }
223 222