patch-2.4.0-test9 linux/drivers/char/lp.c

Next file: linux/drivers/char/mem.c
Previous file: linux/drivers/char/joystick/pcigame.c
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v2.4.0-test8/linux/drivers/char/lp.c linux/drivers/char/lp.c
@@ -712,11 +712,12 @@
 		if (parport_nr[0] == LP_PARPORT_AUTO &&
 		    port->probe_info[0].class != PARPORT_CLASS_PRINTER)
 			return;
-
+		if (lp_count == LP_NO) {
+			printk("lp: ignoring parallel port (max. %d)\n",LP_NO);
+			return;
+		}
 		if (!lp_register(lp_count, port))
-			if (++lp_count == LP_NO)
-				break;
-
+			lp_count++;
 		break;
 
 	default:

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)