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

usb: gadget: Update at91_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
5a6506f0 ef20a72b

+7 -11
+7 -8
drivers/usb/gadget/at91_udc.c
··· 212 212 if (udc->enabled && udc->vbus) { 213 213 proc_ep_show(s, &udc->ep[0]); 214 214 list_for_each_entry (ep, &udc->gadget.ep_list, ep.ep_list) { 215 - if (ep->desc) 215 + if (ep->ep.desc) 216 216 proc_ep_show(s, ep); 217 217 } 218 218 } ··· 530 530 tmp |= AT91_UDP_EPEDS; 531 531 __raw_writel(tmp, ep->creg); 532 532 533 - ep->desc = desc; 533 + ep->ep.desc = desc; 534 534 ep->ep.maxpacket = maxpacket; 535 535 536 536 /* ··· 558 558 nuke(ep, -ESHUTDOWN); 559 559 560 560 /* restore the endpoint's pristine config */ 561 - ep->desc = NULL; 562 561 ep->ep.desc = NULL; 563 562 ep->ep.maxpacket = ep->maxpacket; 564 563 ··· 617 618 return -EINVAL; 618 619 } 619 620 620 - if (!_ep || (!ep->desc && ep->ep.name != ep0name)) { 621 + if (!_ep || (!ep->ep.desc && ep->ep.name != ep0name)) { 621 622 DBG("invalid ep\n"); 622 623 return -EINVAL; 623 624 } ··· 832 833 833 834 if (i != 0) 834 835 list_add_tail(&ep->ep.ep_list, &udc->gadget.ep_list); 835 - ep->desc = NULL; 836 + ep->ep.desc = NULL; 836 837 ep->stopped = 0; 837 838 ep->fifo_bank = 0; 838 839 ep->ep.maxpacket = ep->maxpacket; ··· 1171 1172 | USB_REQ_GET_STATUS: 1172 1173 tmp = w_index & USB_ENDPOINT_NUMBER_MASK; 1173 1174 ep = &udc->ep[tmp]; 1174 - if (tmp >= NUM_ENDPOINTS || (tmp && !ep->desc)) 1175 + if (tmp >= NUM_ENDPOINTS || (tmp && !ep->ep.desc)) 1175 1176 goto stall; 1176 1177 1177 1178 if (tmp) { ··· 1196 1197 ep = &udc->ep[tmp]; 1197 1198 if (w_value != USB_ENDPOINT_HALT || tmp >= NUM_ENDPOINTS) 1198 1199 goto stall; 1199 - if (!ep->desc || ep->is_iso) 1200 + if (!ep->ep.desc || ep->is_iso) 1200 1201 goto stall; 1201 1202 if ((w_index & USB_DIR_IN)) { 1202 1203 if (!ep->is_in) ··· 1217 1218 goto stall; 1218 1219 if (tmp == 0) 1219 1220 goto succeed; 1220 - if (!ep->desc || ep->is_iso) 1221 + if (!ep->ep.desc || ep->is_iso) 1221 1222 goto stall; 1222 1223 if ((w_index & USB_DIR_IN)) { 1223 1224 if (!ep->is_in)
-3
drivers/usb/gadget/at91_udc.h
··· 105 105 unsigned is_in:1; 106 106 unsigned is_iso:1; 107 107 unsigned fifo_bank:1; 108 - 109 - const struct usb_endpoint_descriptor 110 - *desc; 111 108 }; 112 109 113 110 /*