mirror of
https://github.com/edk2-porting/linux-next.git
synced 2024-12-19 10:44:14 +08:00
usb: gadget: at91_udc: 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:
parent
1009f9a36d
commit
7301971f50
@ -176,7 +176,7 @@ static int proc_udc_show(struct seq_file *s, void *unused)
|
||||
udc->enabled
|
||||
? (udc->vbus ? "active" : "enabled")
|
||||
: "disabled",
|
||||
udc->selfpowered ? "self" : "VBUS",
|
||||
udc->gadget.is_selfpowered ? "self" : "VBUS",
|
||||
udc->suspended ? ", suspended" : "",
|
||||
udc->driver ? udc->driver->driver.name : "(none)");
|
||||
|
||||
@ -1000,7 +1000,7 @@ static int at91_set_selfpowered(struct usb_gadget *gadget, int is_on)
|
||||
unsigned long flags;
|
||||
|
||||
spin_lock_irqsave(&udc->lock, flags);
|
||||
udc->selfpowered = (is_on != 0);
|
||||
gadget->is_selfpowered = (is_on != 0);
|
||||
spin_unlock_irqrestore(&udc->lock, flags);
|
||||
return 0;
|
||||
}
|
||||
@ -1149,7 +1149,7 @@ static void handle_setup(struct at91_udc *udc, struct at91_ep *ep, u32 csr)
|
||||
*/
|
||||
case ((USB_DIR_IN|USB_TYPE_STANDARD|USB_RECIP_DEVICE) << 8)
|
||||
| USB_REQ_GET_STATUS:
|
||||
tmp = (udc->selfpowered << USB_DEVICE_SELF_POWERED);
|
||||
tmp = (udc->gadget.is_selfpowered << USB_DEVICE_SELF_POWERED);
|
||||
if (at91_udp_read(udc, AT91_UDP_GLB_STAT) & AT91_UDP_ESR)
|
||||
tmp |= (1 << USB_DEVICE_REMOTE_WAKEUP);
|
||||
PACKET("get device status\n");
|
||||
@ -1653,7 +1653,7 @@ static int at91_start(struct usb_gadget *gadget,
|
||||
udc->driver = driver;
|
||||
udc->gadget.dev.of_node = udc->pdev->dev.of_node;
|
||||
udc->enabled = 1;
|
||||
udc->selfpowered = 1;
|
||||
udc->gadget.is_selfpowered = 1;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
@ -122,7 +122,6 @@ struct at91_udc {
|
||||
unsigned req_pending:1;
|
||||
unsigned wait_for_addr_ack:1;
|
||||
unsigned wait_for_config_ack:1;
|
||||
unsigned selfpowered:1;
|
||||
unsigned active_suspend:1;
|
||||
u8 addr;
|
||||
struct at91_udc_data board;
|
||||
|
Loading…
Reference in New Issue
Block a user