diff options
author | Ralf Baechle <ralf@linux-mips.org> | 1997-12-01 04:02:08 +0000 |
---|---|---|
committer | Ralf Baechle <ralf@linux-mips.org> | 1997-12-01 04:02:08 +0000 |
commit | fd095d09f2d475dc2e8599b1b8bae1cd65e91685 (patch) | |
tree | 217f87a997699505e0dd752931409b9f10fffe65 /drivers/pnp | |
parent | c02e0599c4233f97071928f8118841954bacdadf (diff) |
Merge with 2.1.56 as first part of merging back my code.
Diffstat (limited to 'drivers/pnp')
-rw-r--r-- | drivers/pnp/parport_probe.c | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/drivers/pnp/parport_probe.c b/drivers/pnp/parport_probe.c index 85f89e4c7..fc2f82702 100644 --- a/drivers/pnp/parport_probe.c +++ b/drivers/pnp/parport_probe.c @@ -1,4 +1,4 @@ -/* $Id: parport_probe.c,v 1.3 1997/08/06 19:15:53 miguel Exp $ +/* $Id: parport_probe.c,v 1.4 1997/09/12 01:32:20 ralf Exp $ * Parallel port device probing code * * Authors: Carsten Gross, carsten@sol.wohnheim.uni-ulm.de @@ -84,13 +84,13 @@ static long read_polled(struct parport *port, char *buf, return count; } -static struct wait_queue *wait_q = NULL; +static struct wait_queue *wait_q; static void wakeup(void *ref) { struct pardevice **dev = (struct pardevice **)ref; - if (!wait_q || parport_claim(*dev)) + if (!waitqueue_active || parport_claim(*dev)) return; wake_up(&wait_q); @@ -108,10 +108,9 @@ int parport_probe(struct parport *port, char *buffer, int len) return -EINVAL; } - if (parport_claim(dev)) { + init_waitqueue (&wait_q); + if (parport_claim(dev)) sleep_on(&wait_q); - wait_q = NULL; - } switch (parport_ieee1284_nibble_mode_ok(port, 4)) { case 1: |