mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-07 04:12:04 -04:00
Merge "USB: gadget: composite: Allow bMaxPower=0 if self-powered"
This commit is contained in:
commit
a553896366
1 changed files with 1 additions and 1 deletions
|
|
@ -520,7 +520,7 @@ static u8 encode_bMaxPower(enum usb_device_speed speed,
|
|||
{
|
||||
unsigned val;
|
||||
|
||||
if (c->MaxPower)
|
||||
if (c->MaxPower || (c->bmAttributes & USB_CONFIG_ATT_SELFPOWER))
|
||||
val = c->MaxPower;
|
||||
else
|
||||
val = CONFIG_USB_GADGET_VBUS_DRAW;
|
||||
|
|
|
|||
Loading…
Reference in a new issue