Messages in this thread Patch in this message | | | From | Rusty Trivial Russell <> | Subject | [TRIVIAL] 2.5.31_drivers_char_lp.c | Date | Tue, 10 Sep 2002 19:20:15 +1000 |
| |
[ As per 2.4.19 AC kernel tree, makes sense --RR ] From: Lucas Correia Villa Real <lucasvr@terra.com.br>
Hi,
This is a trivial patch already applied in the -ac tree for the 2.4.19 kernel. Patch for lp.c avoid +/- operations with 0 and explicit some debug information as KERN_INFO or KERN_ERR.
Comments?
Lucas
--- trivial-2.5.34/drivers/char/lp.c.orig 2002-09-10 19:10:55.000000000 +1000 +++ trivial-2.5.34/drivers/char/lp.c 2002-09-10 19:10:55.000000000 +1000 @@ -335,7 +335,7 @@ do { /* Write the data. */ written = parport_write (port, kbuf, copy_size); - if (written >= 0) { + if (written > 0) { copy_size -= written; count -= written; buf += written; @@ -840,7 +840,7 @@ port->probe_info[0].class != PARPORT_CLASS_PRINTER) return; if (lp_count == LP_NO) { - printk("lp: ignoring parallel port (max. %d)\n",LP_NO); + printk(KERN_INFO "lp: ignoring parallel port (max. %d)\n",LP_NO); return; } if (!lp_register(lp_count, port)) @@ -904,14 +904,14 @@ } if (register_chrdev (LP_MAJOR, "lp", &lp_fops)) { - printk ("lp: unable to get major %d\n", LP_MAJOR); + printk (KERN_ERR "lp: unable to get major %d\n", LP_MAJOR); return -EIO; } devfs_handle = devfs_mk_dir (NULL, "printers", NULL); if (parport_register_driver (&lp_driver)) { - printk ("lp: unable to register with parport\n"); + printk (KERN_ERR "lp: unable to register with parport\n"); return -EIO; } -- Don't blame me: the Monkey is driving File: Lucas Correia Villa Real <lucasvr@terra.com.br>: [PATCH] 2.5.31_drivers_char_lp.c - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
| |