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

usb: gadget: Update s3c2410_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
fa42e52b 9e658f26

+6 -9
+6 -8
drivers/usb/gadget/s3c2410_udc.c
··· 1062 1062 1063 1063 ep = to_s3c2410_ep(_ep); 1064 1064 1065 - if (!_ep || !desc || ep->desc 1065 + if (!_ep || !desc || ep->ep.desc 1066 1066 || _ep->name == ep0name 1067 1067 || desc->bDescriptorType != USB_DT_ENDPOINT) 1068 1068 return -EINVAL; ··· 1075 1075 1076 1076 local_irq_save (flags); 1077 1077 _ep->maxpacket = max & 0x7ff; 1078 - ep->desc = desc; 1078 + ep->ep.desc = desc; 1079 1079 ep->halted = 0; 1080 1080 ep->bEndpointAddress = desc->bEndpointAddress; 1081 1081 ··· 1136 1136 unsigned long flags; 1137 1137 u32 int_en_reg; 1138 1138 1139 - if (!_ep || !ep->desc) { 1139 + if (!_ep || !ep->ep.desc) { 1140 1140 dprintk(DEBUG_NORMAL, "%s not enabled\n", 1141 1141 _ep ? ep->ep.name : NULL); 1142 1142 return -EINVAL; ··· 1146 1146 1147 1147 dprintk(DEBUG_NORMAL, "ep_disable: %s\n", _ep->name); 1148 1148 1149 - ep->desc = NULL; 1150 1149 ep->ep.desc = NULL; 1151 1150 ep->halted = 1; 1152 1151 ··· 1194 1195 1195 1196 dprintk(DEBUG_VERBOSE, "%s(%p,%p)\n", __func__, _ep, _req); 1196 1197 1197 - if (!ep || !_req || (!ep->desc && _ep->name != ep0name)) 1198 + if (!ep || !_req || (!ep->ep.desc && _ep->name != ep0name)) 1198 1199 return; 1199 1200 1200 1201 WARN_ON (!list_empty (&req->queue)); ··· 1214 1215 int fifo_count = 0; 1215 1216 unsigned long flags; 1216 1217 1217 - if (unlikely (!_ep || (!ep->desc && ep->ep.name != ep0name))) { 1218 + if (unlikely(!_ep || (!ep->ep.desc && ep->ep.name != ep0name))) { 1218 1219 dprintk(DEBUG_NORMAL, "%s: invalid args\n", __func__); 1219 1220 return -EINVAL; 1220 1221 } ··· 1362 1363 unsigned long flags; 1363 1364 u32 idx; 1364 1365 1365 - if (unlikely (!_ep || (!ep->desc && ep->ep.name != ep0name))) { 1366 + if (unlikely(!_ep || (!ep->ep.desc && ep->ep.name != ep0name))) { 1366 1367 dprintk(DEBUG_NORMAL, "%s: inval 2\n", __func__); 1367 1368 return -EINVAL; 1368 1369 } ··· 1628 1629 list_add_tail (&ep->ep.ep_list, &dev->gadget.ep_list); 1629 1630 1630 1631 ep->dev = dev; 1631 - ep->desc = NULL; 1632 1632 ep->ep.desc = NULL; 1633 1633 ep->halted = 0; 1634 1634 INIT_LIST_HEAD (&ep->queue);
-1
drivers/usb/gadget/s3c2410_udc.h
··· 19 19 unsigned long last_io; /* jiffies timestamp */ 20 20 struct usb_gadget *gadget; 21 21 struct s3c2410_udc *dev; 22 - const struct usb_endpoint_descriptor *desc; 23 22 struct usb_ep ep; 24 23 u8 num; 25 24