usb: renesas_usbhs: gadget: set value for common is_selfpowered
authorPeter Chen <peter.chen@freescale.com>
Wed, 28 Jan 2015 08:32:28 +0000 (16:32 +0800)
committerFelipe Balbi <balbi@ti.com>
Thu, 29 Jan 2015 16:32:51 +0000 (10:32 -0600)
Set value for common is_selfpowered.

Signed-off-by: Peter Chen <peter.chen@freescale.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
drivers/usb/renesas_usbhs/mod_gadget.c

index 8697e6efcabf92df1ace5b62defa9adcf954ea5c..e0384af77e567c8a278f80b1368d8fe2ce9b59e3 100644 (file)
@@ -926,6 +926,8 @@ static int usbhsg_set_selfpowered(struct usb_gadget *gadget, int is_self)
        else
                usbhsg_status_clr(gpriv, USBHSG_STATUS_SELF_POWERED);
 
+       gadget->is_selfpowered = (is_self != 0);
+
        return 0;
 }