# This is a BitKeeper generated patch for the following project:
# Project Name: Linux kernel tree
# This patch format is intended for GNU patch command version 2.5 or higher.
# This patch includes the following deltas:
#	           ChangeSet	1.475   -> 1.476  
#	drivers/usb/input/fixp-arith.h	1.1     -> 1.2    
#	drivers/usb/input/hid-core.c	1.31    -> 1.32   
#
# The following is the BitKeeper ChangeSet Log
# --------------------------------------------
# 02/07/26	vojtech@suse.cz	1.476
# [PATCH] Fixes needed to get Logitech WingMan 3D running
# 
# Some fixes from Johann Deneux:
#   Fixes needed to get WingMan Force 3D running. (Fix in fixp_cos
#   and hid_init_reports).
# --------------------------------------------
#
diff -Nru a/drivers/usb/input/fixp-arith.h b/drivers/usb/input/fixp-arith.h
--- a/drivers/usb/input/fixp-arith.h	Fri Jul 26 13:48:32 2002
+++ b/drivers/usb/input/fixp-arith.h	Fri Jul 26 13:48:32 2002
@@ -66,7 +66,13 @@
 inline fixp_t fixp_cos(unsigned int degrees)
 {
 	int quadrant = (degrees / 90) & 3;
-	unsigned int i = (degrees % 90) >> 1;
+	unsigned int i = degrees % 90;
+
+	if (quadrant == 1 || quadrant == 3) {
+		i = 89 - i;
+	}
+
+	i >>= 1;
 
 	return (quadrant == 1 || quadrant == 2)? -cos_table[i] : cos_table[i];
 }
diff -Nru a/drivers/usb/input/hid-core.c b/drivers/usb/input/hid-core.c
--- a/drivers/usb/input/hid-core.c	Fri Jul 26 13:48:32 2002
+++ b/drivers/usb/input/hid-core.c	Fri Jul 26 13:48:32 2002
@@ -1281,10 +1281,8 @@
 			usb_unlink_urb(hid->urbout);
 	}
 
-	if (err) {
+	if (err)
 		warn("timeout initializing reports\n");
-		return;
-	}
 
 	report_enum = hid->report_enum + HID_INPUT_REPORT;
 	list = report_enum->report_list.next;
