patch-2.3.40 linux/drivers/usb/joydev.c

Next file: linux/drivers/usb/keybdev.c
Previous file: linux/drivers/usb/inode.c
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v2.3.39/linux/drivers/usb/joydev.c linux/drivers/usb/joydev.c
@@ -424,9 +424,13 @@
 	joydev->minor = ffz(joydev_minors);
 	set_bit(joydev->minor, &joydev_minors);
 	joydev_base[joydev->minor] = joydev;
-	
+
 	for (i = 0; i < joydev->nabs; i++) {
 		j = joydev->abspam[i];
+		if (dev->absmax[j] == dev->absmin[j]) {
+			joydev->corr[i].type = JS_CORR_NONE;
+			continue;
+		}
 		joydev->corr[i].type = JS_CORR_BROKEN;
 		joydev->corr[i].prec = dev->absfuzz[j];
 		joydev->corr[i].coef[0] = (dev->absmax[j] + dev->absmin[j]) / 2 - dev->absflat[j];

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