Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit a5538963 authored by qctecmdr's avatar qctecmdr Committed by Gerrit - the friendly Code Review server
Browse files

Merge "USB: gadget: composite: Allow bMaxPower=0 if self-powered"

parents 3f31685c 9ffbd89c
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -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;