aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/usb
diff options
context:
space:
mode:
authorErik Gilling <konkers@android.com>2011-09-07 11:37:24 -0700
committerErik Gilling <konkers@android.com>2011-09-07 11:37:24 -0700
commit4fa9daaab909792c71a737425aa26dd2acd1a9d4 (patch)
tree1a1fe57fbd5b62ccd5d7f4c192489ec9be905287 /drivers/usb
parentb6163fc86c41c34730f4196e4173061ee4680b3d (diff)
parent16a04e4e2b2c93c0a3e1cb343da7f5de1df28aed (diff)
downloadkernel_samsung_tuna-4fa9daaab909792c71a737425aa26dd2acd1a9d4.zip
kernel_samsung_tuna-4fa9daaab909792c71a737425aa26dd2acd1a9d4.tar.gz
kernel_samsung_tuna-4fa9daaab909792c71a737425aa26dd2acd1a9d4.tar.bz2
Merge branch 'android-omap-3.0' into android-omap-tuna-3.0
Diffstat (limited to 'drivers/usb')
-rw-r--r--drivers/usb/gadget/android.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/drivers/usb/gadget/android.c b/drivers/usb/gadget/android.c
index d99ec1e..96b5ef5 100644
--- a/drivers/usb/gadget/android.c
+++ b/drivers/usb/gadget/android.c
@@ -91,8 +91,7 @@ struct android_usb_function {
/* Optional: called when the configuration is removed */
void (*unbind_config)(struct android_usb_function *, struct usb_configuration *);
- /* Optional: handle ctrl requests before the device is configured
- * and/or before the function is enabled */
+ /* Optional: handle ctrl requests before the device is configured */
int (*ctrlrequest)(struct android_usb_function *,
struct usb_composite_dev *,
const struct usb_ctrlrequest *);
@@ -1073,6 +1072,12 @@ android_setup(struct usb_gadget *gadget, const struct usb_ctrlrequest *c)
}
}
+ /* Special case the accessory function.
+ * It needs to handle control requests before it is enabled.
+ */
+ if (value < 0)
+ value = acc_ctrlrequest(cdev, c);
+
if (value < 0)
value = composite_setup(gadget, c);