aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/parport/ieee1284_ops.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/parport/ieee1284_ops.c')
-rw-r--r--drivers/parport/ieee1284_ops.c10
1 files changed, 4 insertions, 6 deletions
diff --git a/drivers/parport/ieee1284_ops.c b/drivers/parport/ieee1284_ops.c
index 6624278c6ed8..ce1e2aad8b10 100644
--- a/drivers/parport/ieee1284_ops.c
+++ b/drivers/parport/ieee1284_ops.c
@@ -60,7 +60,7 @@ size_t parport_ieee1284_write_compat (struct parport *port,
60 parport_data_forward (port); 60 parport_data_forward (port);
61 while (count < len) { 61 while (count < len) {
62 unsigned long expire = jiffies + dev->timeout; 62 unsigned long expire = jiffies + dev->timeout;
63 long wait = (HZ + 99) / 100; 63 long wait = msecs_to_jiffies(10);
64 unsigned char mask = (PARPORT_STATUS_ERROR 64 unsigned char mask = (PARPORT_STATUS_ERROR
65 | PARPORT_STATUS_BUSY); 65 | PARPORT_STATUS_BUSY);
66 unsigned char val = (PARPORT_STATUS_ERROR 66 unsigned char val = (PARPORT_STATUS_ERROR
@@ -97,8 +97,7 @@ size_t parport_ieee1284_write_compat (struct parport *port,
97 our interrupt handler called. */ 97 our interrupt handler called. */
98 if (count && no_irq) { 98 if (count && no_irq) {
99 parport_release (dev); 99 parport_release (dev);
100 __set_current_state (TASK_INTERRUPTIBLE); 100 schedule_timeout_interruptible(wait);
101 schedule_timeout (wait);
102 parport_claim_or_block (dev); 101 parport_claim_or_block (dev);
103 } 102 }
104 else 103 else
@@ -542,13 +541,12 @@ size_t parport_ieee1284_ecp_read_data (struct parport *port,
542 /* Yield the port for a while. */ 541 /* Yield the port for a while. */
543 if (count && dev->port->irq != PARPORT_IRQ_NONE) { 542 if (count && dev->port->irq != PARPORT_IRQ_NONE) {
544 parport_release (dev); 543 parport_release (dev);
545 __set_current_state (TASK_INTERRUPTIBLE); 544 schedule_timeout_interruptible(msecs_to_jiffies(40));
546 schedule_timeout ((HZ + 24) / 25);
547 parport_claim_or_block (dev); 545 parport_claim_or_block (dev);
548 } 546 }
549 else 547 else
550 /* We must have the device claimed here. */ 548 /* We must have the device claimed here. */
551 parport_wait_event (port, (HZ + 24) / 25); 549 parport_wait_event (port, msecs_to_jiffies(40));
552 550
553 /* Is there a signal pending? */ 551 /* Is there a signal pending? */
554 if (signal_pending (current)) 552 if (signal_pending (current))