diff options
Diffstat (limited to 'drivers/staging/emxx_udc/emxx_udc.c')
-rw-r--r-- | drivers/staging/emxx_udc/emxx_udc.c | 43 |
1 files changed, 2 insertions, 41 deletions
diff --git a/drivers/staging/emxx_udc/emxx_udc.c b/drivers/staging/emxx_udc/emxx_udc.c index 3e51476a7045..65cc3d9af972 100644 --- a/drivers/staging/emxx_udc/emxx_udc.c +++ b/drivers/staging/emxx_udc/emxx_udc.c @@ -1369,25 +1369,6 @@ static void _nbu2ss_set_endpoint_stall( } /*-------------------------------------------------------------------------*/ -/* Device Descriptor */ -static struct usb_device_descriptor device_desc = { - .bLength = sizeof(device_desc), - .bDescriptorType = USB_DT_DEVICE, - .bcdUSB = cpu_to_le16(0x0200), - .bDeviceClass = USB_CLASS_VENDOR_SPEC, - .bDeviceSubClass = 0x00, - .bDeviceProtocol = 0x00, - .bMaxPacketSize0 = 64, - .idVendor = cpu_to_le16(0x0409), - .idProduct = cpu_to_le16(0xfff0), - .bcdDevice = 0xffff, - .iManufacturer = 0x00, - .iProduct = 0x00, - .iSerialNumber = 0x00, - .bNumConfigurations = 0x01, -}; - -/*-------------------------------------------------------------------------*/ static void _nbu2ss_set_test_mode(struct nbu2ss_udc *udc, u32 mode) { u32 data; @@ -2513,7 +2494,7 @@ static int nbu2ss_ep_enable( } ep = container_of(_ep, struct nbu2ss_ep, ep); - if ((!ep) || (!ep->udc)) { + if ((!ep->udc)) { pr_err(" *** %s, ep == NULL !!\n", __func__); return -EINVAL; } @@ -2570,7 +2551,7 @@ static int nbu2ss_ep_disable(struct usb_ep *_ep) } ep = container_of(_ep, struct nbu2ss_ep, ep); - if ((!ep) || (!ep->udc)) { + if (!ep->udc) { pr_err("udc: *** %s, ep == NULL !!\n", __func__); return -EINVAL; } @@ -2743,10 +2724,6 @@ static int nbu2ss_ep_dequeue( } ep = container_of(_ep, struct nbu2ss_ep, ep); - if (!ep) { - pr_err("%s, ep == NULL !!\n", __func__); - return -EINVAL; - } udc = ep->udc; if (!udc) @@ -2787,10 +2764,6 @@ static int nbu2ss_ep_set_halt(struct usb_ep *_ep, int value) } ep = container_of(_ep, struct nbu2ss_ep, ep); - if (!ep) { - pr_err("%s, bad ep\n", __func__); - return -EINVAL; - } udc = ep->udc; if (!udc) { @@ -2839,10 +2812,6 @@ static int nbu2ss_ep_fifo_status(struct usb_ep *_ep) } ep = container_of(_ep, struct nbu2ss_ep, ep); - if (!ep) { - pr_err("%s, bad ep\n", __func__); - return -EINVAL; - } udc = ep->udc; if (!udc) { @@ -2885,10 +2854,6 @@ static void nbu2ss_ep_fifo_flush(struct usb_ep *_ep) } ep = container_of(_ep, struct nbu2ss_ep, ep); - if (!ep) { - pr_err("udc: %s, bad ep\n", __func__); - return; - } udc = ep->udc; if (!udc) { @@ -2959,10 +2924,6 @@ static int nbu2ss_gad_wakeup(struct usb_gadget *pgadget) } udc = container_of(pgadget, struct nbu2ss_udc, gadget); - if (!udc) { - dev_err(&pgadget->dev, "%s, udc == NULL\n", __func__); - return -EINVAL; - } data = gpio_get_value(VBUS_VALUE); if (data == 0) { |