mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [TRIVIAL] 2.5.31_drivers_char_lp.c
@ 2002-09-10  9:20 Rusty Trivial Russell
  0 siblings, 0 replies; only message in thread
From: Rusty Trivial Russell @ 2002-09-10  9:20 UTC (permalink / raw)
  To: torvalds, linux-kernel

[ 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

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2002-09-10  9:23 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-09-10  9:20 [TRIVIAL] 2.5.31_drivers_char_lp.c Rusty Trivial Russell

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®