patch-2.2.8 linux/drivers/char/adbmouse.c

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

diff -u --recursive --new-file v2.2.7/linux/drivers/char/adbmouse.c linux/drivers/char/adbmouse.c
@@ -113,7 +113,7 @@
      *  on a logitech mouseman, the right and mid buttons sometimes behave
      *  strangely until they both have been pressed after booting. */
     /* data valid only if extended mouse format ! */
-    if (nb == 4)
+    if (nb >= 4)
 	buttons = (buttons&6) | (buf[3] & 0x80 ? 1 : 0); /* 1+3 unchanged */
 
     add_mouse_randomness(((~buttons&7) << 16) + ((buf[2]&0x7f) << 8) + (buf[1]&0x7f));

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)