Fix 'get mouse type' command emulation in mousedev.c
PATCH 1/1 Fix 'get mouse type' command emulation in mousedev.c
Hi!
New GPM (1.19.4+) uses a more sophisticated method of detecting PS/2 mice. This uncovers a minor bug in mousedev. Mousedev reports always mouse type 4 (ExplorerPS/2) regardless of the mode it is in due to missing break;'s in a switch statement. This patch fixes it. Patch against 2.4.10 or similar.
drivers/input/mousedev.c +3 -3
@@ -314,9 +314,9 @@case 0xf2 :/* Get ID */ switch (list->mode) { -case 0 : list->ps2[1 ] =0 ; -case 1 : list->ps2[1 ] =3 ; -case 2 : list->ps2[1 ] =4 ; +case 0 : list->ps2[1 ] =0 ;break ; +case 1 : list->ps2[1 ] =3 ;break ; +case 2 : list->ps2[1 ] =4 ;break ; } list->bufsiz =2 ;break ;
Signature · 2 lines
Vojtech Pavlik SuSE Labs