usb: gadget: dummy_hcd: set value for common is_selfpowered
authorPeter Chen <peter.chen@freescale.com>
Wed, 28 Jan 2015 08:32:30 +0000 (16:32 +0800)
committerFelipe Balbi <balbi@ti.com>
Thu, 29 Jan 2015 16:33:01 +0000 (10:33 -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/gadget/udc/dummy_hcd.c

index 270c1ec650fa0c07792d3802ca92cfeaa4187200..8dda48445f6ff5a4a066d870f61bd539c603c214 100644 (file)
@@ -802,6 +802,7 @@ static int dummy_set_selfpowered(struct usb_gadget *_gadget, int value)
 {
        struct dummy    *dum;
 
+       _gadget->is_selfpowered = (value != 0);
        dum = gadget_to_dummy_hcd(_gadget)->dum;
        if (value)
                dum->devstatus |= (1 << USB_DEVICE_SELF_POWERED);