From: Peter Chen Date: Wed, 28 Jan 2015 08:32:38 +0000 (+0800) Subject: usb: gadget: atmel_usba_udc: set value for common is_selfpowered X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=d618c368ef98631da3adf802e500d5c61103804f;p=GitHub%2Fmoto-9609%2Fandroid_kernel_motorola_exynos9610.git usb: gadget: atmel_usba_udc: set value for common is_selfpowered Set value for common is_selfpowered. Signed-off-by: Peter Chen Signed-off-by: Felipe Balbi --- diff --git a/drivers/usb/gadget/udc/atmel_usba_udc.c b/drivers/usb/gadget/udc/atmel_usba_udc.c index 4b5b7fafac85..c0410862c2a1 100644 --- a/drivers/usb/gadget/udc/atmel_usba_udc.c +++ b/drivers/usb/gadget/udc/atmel_usba_udc.c @@ -989,6 +989,7 @@ usba_udc_set_selfpowered(struct usb_gadget *gadget, int is_selfpowered) struct usba_udc *udc = to_usba_udc(gadget); unsigned long flags; + gadget->is_selfpowered = (is_selfpowered != 0); spin_lock_irqsave(&udc->lock, flags); if (is_selfpowered) udc->devstatus |= 1 << USB_DEVICE_SELF_POWERED;