I think the problem was that lp_setup wasn't checking `str' to see if it
was NULL before using it. Here's a patch (Linus, please apply it for
2.1.89). It fixes the problem for me:
--- linux-2.1.88+5/drivers/char/lp.c Sun Feb 22 17:06:23 1998
+++ linux/drivers/char/lp.c Tue Feb 24 23:20:50 1998
@@ -654,7 +654,14 @@
__initfunc(void lp_setup(char *str, int *ints))
{
- if (!strncmp(str, "parport", 7)) {
+ if (!str) {
+ if (ints[0] == 0 || ints[1] == 0) {
+ /* disable driver on "lp=" or "lp=0" */
+ parport[0] = LP_PARPORT_OFF;
+ } else {
+ printk(KERN_WARNING "warning: 'lp=0x%x' is deprecated, ignored\n", ints[1]);
+ }
+ } else if (!strncmp(str, "parport", 7)) {
int n = simple_strtoul(str+7, NULL, 10);
if (parport_ptr < LP_NO)
parport[parport_ptr++] = n;
@@ -667,13 +674,6 @@
parport[parport_ptr++] = LP_PARPORT_NONE;
} else if (!strcmp(str, "reset")) {
reset = 1;
- } else {
- if (ints[0] == 0 || ints[1] == 0) {
- /* disable driver on "lp=" or "lp=0" */
- parport[0] = LP_PARPORT_OFF;
- } else {
- printk(KERN_WARNING "warning: 'lp=0x%x' is deprecated, ignored\n", ints[1]);
- }
}
}
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu