patch-2.2.4 linux/drivers/char/lp.c
Next file: linux/drivers/char/pcxx.c
Previous file: linux/drivers/char/epca.c
Back to the patch index
Back to the overall index
- Lines: 57
- Date:
Thu Mar 11 09:27:06 1999
- Orig file:
v2.2.3/linux/drivers/char/lp.c
- Orig date:
Wed Dec 16 10:32:55 1998
diff -u --recursive --new-file v2.2.3/linux/drivers/char/lp.c linux/drivers/char/lp.c
@@ -437,7 +437,7 @@
} else if (!(status & LP_PERRORP)) {
if (last != LP_PERRORP) {
last = LP_PERRORP;
- printk(KERN_ERR "lp%d on fire!\n", minor);
+ printk(KERN_INFO "lp%d on fire!\n", minor);
}
}
else last = 0;
@@ -664,17 +664,15 @@
}
if ((i & 1) != 0) {
Byte |= (z<<4);
- if (temp) {
- if (__put_user (Byte, temp))
- {
- count = -EFAULT;
- temp = NULL;
- } else {
- temp++;
+ if (__put_user (Byte, temp))
+ {
+ count = -EFAULT;
+ break;
+ } else {
+ temp++;
- if (++count == length)
- temp = NULL;
- }
+ if (++count == length)
+ break;
}
/* Does the error line indicate end of data? */
if ((parport_read_status(port) & LP_PERRORP) ==
@@ -952,16 +950,12 @@
default:
for (i = 0; i < LP_NO; i++) {
- if (parport_nr[i] >= 0) {
- char buffer[16];
- sprintf(buffer, "parport%d", parport_nr[i]);
- for (port = parport_enumerate(); port;
- port = port->next) {
- if (!strcmp(port->name, buffer)) {
- (void) lp_register(i, port);
+ for (port = parport_enumerate(); port;
+ port = port->next) {
+ if (port->number == parport_nr[i]) {
+ if (!lp_register(i, port))
count++;
- break;
- }
+ break;
}
}
}
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)