2
0
mirror of https://github.com/edk2-porting/linux-next.git synced 2024-12-20 11:13:58 +08:00

usb: musb: gadget: use common is_selfpowered

Delete private selfpowered variable, and use common one.

Signed-off-by: Peter Chen <peter.chen@freescale.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
This commit is contained in:
Peter Chen 2015-01-28 16:32:41 +08:00 committed by Felipe Balbi
parent bcdea50312
commit dadac9861f
2 changed files with 2 additions and 4 deletions

View File

@ -1612,9 +1612,7 @@ done:
static int static int
musb_gadget_set_self_powered(struct usb_gadget *gadget, int is_selfpowered) musb_gadget_set_self_powered(struct usb_gadget *gadget, int is_selfpowered)
{ {
struct musb *musb = gadget_to_musb(gadget); gadget->is_selfpowered = !!is_selfpowered;
musb->is_self_powered = !!is_selfpowered;
return 0; return 0;
} }

View File

@ -85,7 +85,7 @@ static int service_tx_status_request(
switch (recip) { switch (recip) {
case USB_RECIP_DEVICE: case USB_RECIP_DEVICE:
result[0] = musb->is_self_powered << USB_DEVICE_SELF_POWERED; result[0] = musb->g.is_selfpowered << USB_DEVICE_SELF_POWERED;
result[0] |= musb->may_wakeup << USB_DEVICE_REMOTE_WAKEUP; result[0] |= musb->may_wakeup << USB_DEVICE_REMOTE_WAKEUP;
if (musb->g.is_otg) { if (musb->g.is_otg) {
result[0] |= musb->g.b_hnp_enable result[0] |= musb->g.b_hnp_enable