Commit 9e658f26 authored by Ido Shayevitz's avatar Ido Shayevitz Committed by Felipe Balbi

usb: gadget: Update r8a66597-udc to use usb_endpoint_descriptor inside the struct usb_ep

Remove redundant pointer to struct usb_endpoint_descriptor.
Signed-off-by: default avatarIdo Shayevitz <idos@codeaurora.org>
Signed-off-by: default avatarFelipe Balbi <balbi@ti.com>
parent c18800d8
...@@ -459,7 +459,7 @@ static int alloc_pipe_config(struct r8a66597_ep *ep, ...@@ -459,7 +459,7 @@ static int alloc_pipe_config(struct r8a66597_ep *ep,
unsigned char *counter; unsigned char *counter;
int ret; int ret;
ep->desc = desc; ep->ep.desc = desc;
if (ep->pipenum) /* already allocated pipe */ if (ep->pipenum) /* already allocated pipe */
return 0; return 0;
...@@ -648,7 +648,7 @@ static int sudmac_alloc_channel(struct r8a66597 *r8a66597, ...@@ -648,7 +648,7 @@ static int sudmac_alloc_channel(struct r8a66597 *r8a66597,
/* set SUDMAC parameters */ /* set SUDMAC parameters */
dma = &r8a66597->dma; dma = &r8a66597->dma;
dma->used = 1; dma->used = 1;
if (ep->desc->bEndpointAddress & USB_DIR_IN) { if (ep->ep.desc->bEndpointAddress & USB_DIR_IN) {
dma->dir = 1; dma->dir = 1;
} else { } else {
dma->dir = 0; dma->dir = 0;
...@@ -770,7 +770,7 @@ static void start_packet_read(struct r8a66597_ep *ep, ...@@ -770,7 +770,7 @@ static void start_packet_read(struct r8a66597_ep *ep,
static void start_packet(struct r8a66597_ep *ep, struct r8a66597_request *req) static void start_packet(struct r8a66597_ep *ep, struct r8a66597_request *req)
{ {
if (ep->desc->bEndpointAddress & USB_DIR_IN) if (ep->ep.desc->bEndpointAddress & USB_DIR_IN)
start_packet_write(ep, req); start_packet_write(ep, req);
else else
start_packet_read(ep, req); start_packet_read(ep, req);
...@@ -930,7 +930,7 @@ __acquires(r8a66597->lock) ...@@ -930,7 +930,7 @@ __acquires(r8a66597->lock)
if (restart) { if (restart) {
req = get_request_from_ep(ep); req = get_request_from_ep(ep);
if (ep->desc) if (ep->ep.desc)
start_packet(ep, req); start_packet(ep, req);
} }
} }
...@@ -1116,7 +1116,7 @@ static void irq_pipe_ready(struct r8a66597 *r8a66597, u16 status, u16 enb) ...@@ -1116,7 +1116,7 @@ static void irq_pipe_ready(struct r8a66597 *r8a66597, u16 status, u16 enb)
r8a66597_write(r8a66597, ~check, BRDYSTS); r8a66597_write(r8a66597, ~check, BRDYSTS);
ep = r8a66597->pipenum2ep[pipenum]; ep = r8a66597->pipenum2ep[pipenum];
req = get_request_from_ep(ep); req = get_request_from_ep(ep);
if (ep->desc->bEndpointAddress & USB_DIR_IN) if (ep->ep.desc->bEndpointAddress & USB_DIR_IN)
irq_packet_write(ep, req); irq_packet_write(ep, req);
else else
irq_packet_read(ep, req); irq_packet_read(ep, req);
...@@ -1627,7 +1627,7 @@ static int r8a66597_queue(struct usb_ep *_ep, struct usb_request *_req, ...@@ -1627,7 +1627,7 @@ static int r8a66597_queue(struct usb_ep *_ep, struct usb_request *_req,
req->req.actual = 0; req->req.actual = 0;
req->req.status = -EINPROGRESS; req->req.status = -EINPROGRESS;
if (ep->desc == NULL) /* control */ if (ep->ep.desc == NULL) /* control */
start_ep0(ep, req); start_ep0(ep, req);
else { else {
if (request && !ep->busy) if (request && !ep->busy)
...@@ -1692,7 +1692,7 @@ static int r8a66597_set_wedge(struct usb_ep *_ep) ...@@ -1692,7 +1692,7 @@ static int r8a66597_set_wedge(struct usb_ep *_ep)
ep = container_of(_ep, struct r8a66597_ep, ep); ep = container_of(_ep, struct r8a66597_ep, ep);
if (!ep || !ep->desc) if (!ep || !ep->ep.desc)
return -EINVAL; return -EINVAL;
spin_lock_irqsave(&ep->r8a66597->lock, flags); spin_lock_irqsave(&ep->r8a66597->lock, flags);
......
...@@ -72,7 +72,7 @@ struct r8a66597_ep { ...@@ -72,7 +72,7 @@ struct r8a66597_ep {
unsigned use_dma:1; unsigned use_dma:1;
u16 pipenum; u16 pipenum;
u16 type; u16 type;
const struct usb_endpoint_descriptor *desc;
/* register address */ /* register address */
unsigned char fifoaddr; unsigned char fifoaddr;
unsigned char fifosel; unsigned char fifosel;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment