Skip to content

Commit

Permalink
usb: musb: gadget: use common is_selfpowered
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Peter Chen authored and Felipe Balbi committed Jan 29, 2015
1 parent bcdea50 commit dadac98
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
4 changes: 1 addition & 3 deletions drivers/usb/musb/musb_gadget.c
Original file line number Diff line number Diff line change
Expand Up @@ -1612,9 +1612,7 @@ static int musb_gadget_wakeup(struct usb_gadget *gadget)
static int
musb_gadget_set_self_powered(struct usb_gadget *gadget, int is_selfpowered)
{
struct musb *musb = gadget_to_musb(gadget);

musb->is_self_powered = !!is_selfpowered;
gadget->is_selfpowered = !!is_selfpowered;
return 0;
}

Expand Down
2 changes: 1 addition & 1 deletion drivers/usb/musb/musb_gadget_ep0.c
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ static int service_tx_status_request(

switch (recip) {
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;
if (musb->g.is_otg) {
result[0] |= musb->g.b_hnp_enable
Expand Down

0 comments on commit dadac98

Please sign in to comment.