summaryrefslogtreecommitdiff
path: root/drivers/usb/gadget/android.c
diff options
context:
space:
mode:
authorScott Anderson <saa@google.com>2012-01-18 15:56:51 -0800
committerRohan Somvanshi <rsomvanshi@nvidia.com>2012-03-09 05:48:09 -0800
commit9be29bd1c5f03b5f6e428feee22d2a2c4fa1165c (patch)
treeac0c8de9aa8f0b3311a451e4c740907935e2d487 /drivers/usb/gadget/android.c
parent5d3206b5e7b439bf5433fa8931656d90d1d09e67 (diff)
usb: gadget: android: Honor CONFIG_USB_GADGET_VBUS_DRAW
The maximum current draw was hard coded to 500 mA. composite.c has code that uses CONFIG_USB_GADGET_VBUS_DRAW to set the bMaxPower and to set whether or not the device is self-powered if they haven't been set. This change removes the code in android.c to allow composite.c to set them. (cherry picked from commit 09701e3edf03f92f4215aad83b32cd8cec7fb689 from android.googlesource.com/common.git) Change-Id: I9db37922e91ee86e9e5c0e14519e119e5c41ca48 Signed-off-by: Scott Anderson <saa@google.com> Signed-off-by: Varun Wadekar <vwadekar@nvidia.com> Reviewed-on: http://git-master/r/78889 Reviewed-by: Automatic_Commit_Validation_User Reviewed-by: Venkat Moganty <vmoganty@nvidia.com>
Diffstat (limited to 'drivers/usb/gadget/android.c')
-rw-r--r--drivers/usb/gadget/android.c3
1 files changed, 0 insertions, 3 deletions
diff --git a/drivers/usb/gadget/android.c b/drivers/usb/gadget/android.c
index bb3ab3b0e2cc..fbafe8a3bca4 100644
--- a/drivers/usb/gadget/android.c
+++ b/drivers/usb/gadget/android.c
@@ -153,8 +153,6 @@ static struct usb_configuration android_config_driver = {
.label = "android",
.unbind = android_unbind_config,
.bConfigurationValue = 1,
- .bmAttributes = USB_CONFIG_ATT_ONE | USB_CONFIG_ATT_SELFPOWER,
- .bMaxPower = 0xFA, /* 500ma */
};
static void android_work(struct work_struct *data)
@@ -1033,7 +1031,6 @@ static int android_bind(struct usb_composite_dev *cdev)
device_desc.bcdDevice = __constant_cpu_to_le16(0x9999);
}
- usb_gadget_set_selfpowered(gadget);
dev->cdev = cdev;
return 0;