summaryrefslogtreecommitdiff
path: root/drivers/usb/dwc3/ep0.c
diff options
context:
space:
mode:
authorKishon Vijay Abraham I <kishon@ti.com>2015-02-23 18:40:00 +0530
committerMarek Vasut <marex@denx.de>2015-04-14 05:48:09 +0200
commitb6d959acaae08fa217f539245893c663d63a8b7a (patch)
tree10b9bbf71115322fb41fa7fc4e1a6a1c9c4561d2 /drivers/usb/dwc3/ep0.c
parent72e7c32fe4dd21aecd1c37eb7f338613b18af148 (diff)
usb: dwc3: ep0: make dwc3 ep0 build in uboot
*) Changed the included header files to that used in u-boot. *) added dwc3_ep_event_string() used in ep0.c *) Fixed other misc warnings Signed-off-by: Kishon Vijay Abraham I <kishon@ti.com> Reviewed-by: Lukasz Majewski <l.majewski@samsung.com>
Diffstat (limited to 'drivers/usb/dwc3/ep0.c')
-rw-r--r--drivers/usb/dwc3/ep0.c14
1 files changed, 2 insertions, 12 deletions
diff --git a/drivers/usb/dwc3/ep0.c b/drivers/usb/dwc3/ep0.c
index 1751b1d0d9..803ba5198b 100644
--- a/drivers/usb/dwc3/ep0.c
+++ b/drivers/usb/dwc3/ep0.c
@@ -15,24 +15,18 @@
*/
#include <linux/kernel.h>
-#include <linux/slab.h>
-#include <linux/spinlock.h>
-#include <linux/platform_device.h>
-#include <linux/pm_runtime.h>
-#include <linux/interrupt.h>
-#include <linux/io.h>
#include <linux/list.h>
-#include <linux/dma-mapping.h>
#include <linux/usb/ch9.h>
#include <linux/usb/gadget.h>
#include <linux/usb/composite.h>
#include "core.h"
-#include "debug.h"
#include "gadget.h"
#include "io.h"
+#include "linux-compat.h"
+
static void __dwc3_ep0_do_control_status(struct dwc3 *dwc, struct dwc3_ep *dep);
static void __dwc3_ep0_do_control_data(struct dwc3 *dwc,
struct dwc3_ep *dep, struct dwc3_request *req);
@@ -277,8 +271,6 @@ int __dwc3_gadget_ep0_set_halt(struct usb_ep *ep, int value)
int dwc3_gadget_ep0_set_halt(struct usb_ep *ep, int value)
{
- struct dwc3_ep *dep = to_dwc3_ep(ep);
- struct dwc3 *dwc = dep->dwc;
unsigned long flags;
int ret;
@@ -632,12 +624,10 @@ static int dwc3_ep0_set_sel(struct dwc3 *dwc, struct usb_ctrlrequest *ctrl)
struct dwc3_ep *dep;
enum usb_device_state state = dwc->gadget.state;
u16 wLength;
- u16 wValue;
if (state == USB_STATE_DEFAULT)
return -EINVAL;
- wValue = le16_to_cpu(ctrl->wValue);
wLength = le16_to_cpu(ctrl->wLength);
if (wLength != 6) {