patch-2.1.42 linux/drivers/char/lp.c

Next file: linux/drivers/char/pc_keyb.c
Previous file: linux/drivers/char/istallion.c
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v2.1.41/linux/drivers/char/lp.c linux/drivers/char/lp.c
@@ -501,9 +501,8 @@
 static int lp_release(struct inode * inode, struct file * file)
 {
 	unsigned int minor = MINOR(inode->i_rdev);
-	unsigned int irq;
 
-	if ((irq = LP_IRQ(minor))) {
+	if (LP_IRQ(minor) > 0) {
 		kfree_s(lp_table[minor].lp_buffer, LP_BUFFER_SIZE);
 		lp_table[minor].lp_buffer = NULL;
 	}
@@ -707,7 +706,7 @@
 				lp_table[count].flags |= LP_EXIST;
 				printk(KERN_INFO "lp%d: using %s at 0x%x, ", 
 				       count, pb->name, pb->base);
-				if (pb->irq == -1)
+				if (pb->irq == PARPORT_IRQ_NONE)
 					printk("polling.\n");
 				else
 					printk("irq %d.\n", pb->irq);

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen, slshen@lbl.gov