Hi,

It seems to me that code and comments disagree in drivers/usr/core/usb.c.

I attached a patch fixing the comments. Hopefully the code is right :)
This patch is against 2.5.16

-- 
Johann Deneux
--- drivers/usb/core/usb.c~     Mon May 20 11:38:18 2002
+++ drivers/usb/core/usb.c      Sat May 25 21:33:13 2002
@@ -2031,8 +2031,8 @@
  *
  * This call is synchronous, and may not be used in an interrupt context.
  *
- * Returns zero on success, or else the status code returned by the
- * underlying usb_control_msg() call.
+ * Returns the number of bytes received on success, or else the status code
+ * returned by the underlying usb_control_msg() call.
  */
 int usb_get_descriptor(struct usb_device *dev, unsigned char type, unsigned char 
index, void *buf, int size)
 {
@@ -2072,8 +2072,8 @@
  *
  * This call is synchronous, and may not be used in an interrupt context.
  *
- * Returns zero on success, or else the status code returned by the
- * underlying usb_control_msg() call.
+ * Returns the number of bytes received on success, or else the status code
+ * returned by the underlying usb_control_msg() call.
  */
 int usb_get_string(struct usb_device *dev, unsigned short langid, unsigned char 
index, void *buf, int size)
 {
@@ -2099,8 +2099,8 @@
  *
  * This call is synchronous, and may not be used in an interrupt context.
  *
- * Returns zero on success, or else the status code returned by the
- * underlying usb_control_msg() call.
+ * Returns the number of bytes received on success, or else the status code
+ * returned by the underlying usb_control_msg() call.
  */
 int usb_get_device_descriptor(struct usb_device *dev)
 {
@@ -2134,8 +2134,8 @@
  *
  * This call is synchronous, and may not be used in an interrupt context.
  *
- * Returns zero on success, or else the status code returned by the
- * underlying usb_control_msg() call.
+ * Returns the number of bytes received on success, or else the status code
+ * returned by the underlying usb_control_msg() call.
  */
 int usb_get_status(struct usb_device *dev, int type, int target, void *data)
 {

Reply via email to