patch-2.1.92 linux/drivers/char/lp.c
Next file: linux/drivers/char/mem.c
Previous file: linux/drivers/char/console.c
Back to the patch index
Back to the overall index
- Lines: 30
- Date:
Wed Apr 1 16:17:29 1998
- Orig file:
v2.1.91/linux/drivers/char/lp.c
- Orig date:
Tue Mar 10 10:03:31 1998
diff -u --recursive --new-file v2.1.91/linux/drivers/char/lp.c linux/drivers/char/lp.c
@@ -163,14 +163,22 @@
unsigned long count = 0;
struct lp_stats *stats;
- do {
- status = r_str (minor);
- count++;
+ for (;;) {
lp_yield(minor);
- } while (!LP_READY(minor, status) && count < LP_CHAR(minor));
-
- if (count == LP_CHAR(minor))
- return 0;
+ status = r_str (minor);
+ if (++count == LP_CHAR(minor))
+ return 0;
+ if (LP_POLLING(minor))
+ {
+ if (LP_READY(minor, status))
+ break;
+ } else {
+ if (!LP_READY(minor, status))
+ return 0;
+ else
+ break;
+ }
+ }
w_dtr(minor, lpchar);
stats = &LP_STAT(minor);
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen, slshen@lbl.gov