PATCH: Spinlock Macro Arguments Correction in pc_keyb.c

Alex Valys (avalys@optonline.net)
Thu, 29 Nov 2001 18:33:15 -0500


I was compiling 2.5.1-pre3 this evening, and recieved errors to the effect of:
Line xxx:spinlock_unlock used with too many arguments
Line xxxx:spinlock_unlock_irqrestore used with too few arguments
Line XXXX:spinlock_unlock_irqrestore used with too few arguments

Not having ever done any serious kernel programming, I have only a dim
understanding of what spinlocks are, but by looking at those macro
definitions in spinlock.h (and their occurences elsewhere in the file) I
think I determined their proper usage. The following patch fixed the compile
errors, and I'm using 2.5.1-pre3 to type this message.

This is my first patch, so if I did anything wrong please correct me.
-Alex Valys

--- drivers/char/pc_keyb.c.orig Thu Nov 29 18:05:00 2001
+++ drivers/char/pc_keyb.c Thu Nov 29 18:07:14 2001
@@ -420,7 +420,7 @@
kbd_write_command(KBD_CCMD_WRITE_MODE);
kb_wait();
kbd_write_output(AUX_INTS_OFF);
- spin_unlock(&kbd_controller_lock, flags);
+ spin_unlock(&kbd_controller_lock);
}
spin_unlock_irqrestore( &aux_count_lock,flags );
}
@@ -1056,7 +1056,7 @@
fasync_aux(-1, file, 0);
spin_lock_irqsave( &aux_count, flags );
if ( --aux_count ) {
- spin_unlock_irqrestore( &aux_count_lock );
+ spin_unlock_irqrestore( &aux_count_lock, flags );
return 0;
}
spin_unlock_irqrestore( &aux_count_lock, flags );
@@ -1076,7 +1076,7 @@
int flags;
spin_lock_irqsave( &aux_count_lock, flags );
if ( aux_count++ ) {
- spin_unlock_irqrestore( &aux_count_lock );
+ spin_unlock_irqrestore( &aux_count_lock, flags );
return 0;
}
queue->head = queue->tail = 0; /* Flush input queue */

-
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/