summaryrefslogtreecommitdiff
path: root/drivers/usb
diff options
context:
space:
mode:
authorPeter Chen <peter.chen@freescale.com>2015-01-28 11:32:38 +0300
committerFelipe Balbi <balbi@ti.com>2015-01-29 19:35:32 +0300
commitd618c368ef98631da3adf802e500d5c61103804f (patch)
tree1e4b6d57ea7fd84f951c3287f17f1604ab67bc5e /drivers/usb
parentd4a1c47946a2796520a95da6bed8e5642ce9fb19 (diff)
downloadlinux-d618c368ef98631da3adf802e500d5c61103804f.tar.xz
usb: gadget: atmel_usba_udc: set value for common is_selfpowered
Set value for common is_selfpowered. Signed-off-by: Peter Chen <peter.chen@freescale.com> Signed-off-by: Felipe Balbi <balbi@ti.com>
Diffstat (limited to 'drivers/usb')
-rw-r--r--drivers/usb/gadget/udc/atmel_usba_udc.c1
1 files changed, 1 insertions, 0 deletions
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;