patch-2.1.37 linux/drivers/char/keyboard.c

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

diff -u --recursive --new-file v2.1.36/linux/drivers/char/keyboard.c linux/drivers/char/keyboard.c
@@ -501,7 +501,7 @@
 
 	if (up_flag) {
 		rep = 0;
- 		if(!clear_bit(keycode, key_down)) {
+		if(!test_and_clear_bit(keycode, key_down)) {
 		    /* unexpected, but this can happen:
 		       maybe this was a key release for a FOCUS 9000
 		       PF key; if we want to see it, we have to clear
@@ -510,7 +510,7 @@
 		      up_flag = 0;
 		}
 	} else
- 		rep = set_bit(keycode, key_down);
+ 		rep = test_and_set_bit(keycode, key_down);
 
 	if (kbd->kbdmode == VC_MEDIUMRAW) {
 		/* soon keycodes will require more than one byte */

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