mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-10-31 08:28:13 +00:00
usb: gadget: dummy_hcd: 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>
This commit is contained in:
parent
4605437e33
commit
5d9cb6afc4
1 changed files with 1 additions and 0 deletions
|
@ -802,6 +802,7 @@ static int dummy_set_selfpowered(struct usb_gadget *_gadget, int value)
|
||||||
{
|
{
|
||||||
struct dummy *dum;
|
struct dummy *dum;
|
||||||
|
|
||||||
|
_gadget->is_selfpowered = (value != 0);
|
||||||
dum = gadget_to_dummy_hcd(_gadget)->dum;
|
dum = gadget_to_dummy_hcd(_gadget)->dum;
|
||||||
if (value)
|
if (value)
|
||||||
dum->devstatus |= (1 << USB_DEVICE_SELF_POWERED);
|
dum->devstatus |= (1 << USB_DEVICE_SELF_POWERED);
|
||||||
|
|
Loading…
Reference in a new issue