提交 dadac986 编写于 作者: P Peter Chen 提交者: Felipe Balbi

usb: musb: gadget: use common is_selfpowered

Delete private selfpowered variable, and use common one.
Signed-off-by: NPeter Chen <peter.chen@freescale.com>
Signed-off-by: NFelipe Balbi <balbi@ti.com>
上级 bcdea503
...@@ -1612,9 +1612,7 @@ static int musb_gadget_wakeup(struct usb_gadget *gadget) ...@@ -1612,9 +1612,7 @@ static int musb_gadget_wakeup(struct usb_gadget *gadget)
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;
} }
......
...@@ -85,7 +85,7 @@ static int service_tx_status_request( ...@@ -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
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册