Delete private selfpowered variable, and use common one. Signed-off-by: Peter Chen <peter.chen@xxxxxxxxxxxxx> --- drivers/usb/gadget/udc/at91_udc.c | 8 ++++---- drivers/usb/gadget/udc/at91_udc.h | 1 - 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/drivers/usb/gadget/udc/at91_udc.c b/drivers/usb/gadget/udc/at91_udc.c index c862656..c0ec5f7 100644 --- a/drivers/usb/gadget/udc/at91_udc.c +++ b/drivers/usb/gadget/udc/at91_udc.c @@ -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; } diff --git a/drivers/usb/gadget/udc/at91_udc.h b/drivers/usb/gadget/udc/at91_udc.h index 0175246..467dcfb 100644 --- a/drivers/usb/gadget/udc/at91_udc.h +++ b/drivers/usb/gadget/udc/at91_udc.h @@ -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; -- 1.9.1 -- To unsubscribe from this list: send the line "unsubscribe linux-usb" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html