OSDN Git Service
(root)
/
android-x86
/
kernel.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
5c9a52a
)
USB: gadget: android: Disable MTP when RNDIS function is enabled.
author
Mike Lockwood
<lockwood@android.com>
Mon, 23 Aug 2010 12:17:21 +0000
(08:17 -0400)
committer
Brian Swetland
<swetland@google.com>
Tue, 29 Mar 2011 20:57:45 +0000
(13:57 -0700)
Signed-off-by: Mike Lockwood <lockwood@android.com>
drivers/usb/gadget/android.c
patch
|
blob
|
history
diff --git
a/drivers/usb/gadget/android.c
b/drivers/usb/gadget/android.c
index
e258f18
..
8f8b637
100644
(file)
--- a/
drivers/usb/gadget/android.c
+++ b/
drivers/usb/gadget/android.c
@@
-333,12
+333,12
@@
void android_enable_function(struct usb_function *f, int enable)
dev->cdev->desc.bDeviceClass = USB_CLASS_PER_INTERFACE;
/* Windows does not support other interfaces when RNDIS is enabled,
- * so we disable UMS when RNDIS is on.
+ * so we disable UMS
and MTP
when RNDIS is on.
*/
list_for_each_entry(func, &android_config_driver.functions, list) {
- if (!strcmp(func->name, "usb_mass_storage")) {
+ if (!strcmp(func->name, "usb_mass_storage")
+ || !strcmp(func->name, "mtp")) {
usb_function_set_enabled(func, !enable);
- break;
}
}
}