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

Commit 4605437e authored by Peter Chen's avatar Peter Chen Committed by Felipe Balbi
Browse files

usb: gadget: bdc_udc: set value for common is_selfpowered



Set value for common is_selfpowered.

Signed-off-by: default avatarPeter Chen <peter.chen@freescale.com>
Signed-off-by: default avatarFelipe Balbi <balbi@ti.com>
parent a17fd412
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -454,6 +454,7 @@ static int bdc_udc_set_selfpowered(struct usb_gadget *gadget,
	unsigned long           flags;

	dev_dbg(bdc->dev, "%s()\n", __func__);
	gadget->is_selfpowered = (is_self != 0);
	spin_lock_irqsave(&bdc->lock, flags);
	if (!is_self)
		bdc->devstatus |= 1 << USB_DEVICE_SELF_POWERED;