Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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: Ido Shayevitz <idos@codeaurora.org>
Signed-off-by: Felipe Balbi <balbi@ti.com>

authored by

Ido Shayevitz and committed by
Felipe Balbi
9e658f26 c18800d8

+8 -8
+7 -7
drivers/usb/gadget/r8a66597-udc.c
··· 459 459 unsigned char *counter; 460 460 int ret; 461 461 462 - ep->desc = desc; 462 + ep->ep.desc = desc; 463 463 464 464 if (ep->pipenum) /* already allocated pipe */ 465 465 return 0; ··· 648 648 /* set SUDMAC parameters */ 649 649 dma = &r8a66597->dma; 650 650 dma->used = 1; 651 - if (ep->desc->bEndpointAddress & USB_DIR_IN) { 651 + if (ep->ep.desc->bEndpointAddress & USB_DIR_IN) { 652 652 dma->dir = 1; 653 653 } else { 654 654 dma->dir = 0; ··· 770 770 771 771 static void start_packet(struct r8a66597_ep *ep, struct r8a66597_request *req) 772 772 { 773 - if (ep->desc->bEndpointAddress & USB_DIR_IN) 773 + if (ep->ep.desc->bEndpointAddress & USB_DIR_IN) 774 774 start_packet_write(ep, req); 775 775 else 776 776 start_packet_read(ep, req); ··· 930 930 931 931 if (restart) { 932 932 req = get_request_from_ep(ep); 933 - if (ep->desc) 933 + if (ep->ep.desc) 934 934 start_packet(ep, req); 935 935 } 936 936 } ··· 1116 1116 r8a66597_write(r8a66597, ~check, BRDYSTS); 1117 1117 ep = r8a66597->pipenum2ep[pipenum]; 1118 1118 req = get_request_from_ep(ep); 1119 - if (ep->desc->bEndpointAddress & USB_DIR_IN) 1119 + if (ep->ep.desc->bEndpointAddress & USB_DIR_IN) 1120 1120 irq_packet_write(ep, req); 1121 1121 else 1122 1122 irq_packet_read(ep, req); ··· 1627 1627 req->req.actual = 0; 1628 1628 req->req.status = -EINPROGRESS; 1629 1629 1630 - if (ep->desc == NULL) /* control */ 1630 + if (ep->ep.desc == NULL) /* control */ 1631 1631 start_ep0(ep, req); 1632 1632 else { 1633 1633 if (request && !ep->busy) ··· 1692 1692 1693 1693 ep = container_of(_ep, struct r8a66597_ep, ep); 1694 1694 1695 - if (!ep || !ep->desc) 1695 + if (!ep || !ep->ep.desc) 1696 1696 return -EINVAL; 1697 1697 1698 1698 spin_lock_irqsave(&ep->r8a66597->lock, flags);
+1 -1
drivers/usb/gadget/r8a66597-udc.h
··· 72 72 unsigned use_dma:1; 73 73 u16 pipenum; 74 74 u16 type; 75 - const struct usb_endpoint_descriptor *desc; 75 + 76 76 /* register address */ 77 77 unsigned char fifoaddr; 78 78 unsigned char fifosel;