usb: gadget: android: Honor CONFIG_USB_GADGET_VBUS_DRAW
authorScott Anderson <saa@google.com>
Wed, 18 Jan 2012 23:56:51 +0000 (15:56 -0800)
committerDan Willemsen <dwillemsen@nvidia.com>
Sat, 24 Mar 2012 09:15:05 +0000 (02:15 -0700)
commitdb10c664d0f7ed2cc9c77de61222508b348f7f9b
tree6fb0ea0bb52ffd12ca4ebdc5ec986975a77ed34d
parent69130be6401af4c554ac8eeb8d7f059f839a7463
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>

Rebase-Id: R623f3ba0f6fcacce5658cf26b8c63fa834a90581
drivers/usb/gadget/android.c