Commit 955846a6 authored by Ido Shayevitz's avatar Ido Shayevitz Committed by Felipe Balbi

usb: gadget: Update s3c-hsudc 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 0ff21e0e
...@@ -110,7 +110,6 @@ struct s3c_hsudc_ep { ...@@ -110,7 +110,6 @@ struct s3c_hsudc_ep {
struct usb_ep ep; struct usb_ep ep;
char name[20]; char name[20];
struct s3c_hsudc *dev; struct s3c_hsudc *dev;
const struct usb_endpoint_descriptor *desc;
struct list_head queue; struct list_head queue;
u8 stopped; u8 stopped;
u8 wedge; u8 wedge;
...@@ -761,7 +760,7 @@ static int s3c_hsudc_ep_enable(struct usb_ep *_ep, ...@@ -761,7 +760,7 @@ static int s3c_hsudc_ep_enable(struct usb_ep *_ep,
u32 ecr = 0; u32 ecr = 0;
hsep = our_ep(_ep); hsep = our_ep(_ep);
if (!_ep || !desc || hsep->desc || _ep->name == ep0name if (!_ep || !desc || hsep->ep.desc || _ep->name == ep0name
|| desc->bDescriptorType != USB_DT_ENDPOINT || desc->bDescriptorType != USB_DT_ENDPOINT
|| hsep->bEndpointAddress != desc->bEndpointAddress || hsep->bEndpointAddress != desc->bEndpointAddress
|| ep_maxpacket(hsep) < usb_endpoint_maxp(desc)) || ep_maxpacket(hsep) < usb_endpoint_maxp(desc))
...@@ -783,7 +782,7 @@ static int s3c_hsudc_ep_enable(struct usb_ep *_ep, ...@@ -783,7 +782,7 @@ static int s3c_hsudc_ep_enable(struct usb_ep *_ep,
writel(ecr, hsudc->regs + S3C_ECR); writel(ecr, hsudc->regs + S3C_ECR);
hsep->stopped = hsep->wedge = 0; hsep->stopped = hsep->wedge = 0;
hsep->desc = desc; hsep->ep.desc = desc;
hsep->ep.maxpacket = usb_endpoint_maxp(desc); hsep->ep.maxpacket = usb_endpoint_maxp(desc);
s3c_hsudc_set_halt(_ep, 0); s3c_hsudc_set_halt(_ep, 0);
...@@ -806,7 +805,7 @@ static int s3c_hsudc_ep_disable(struct usb_ep *_ep) ...@@ -806,7 +805,7 @@ static int s3c_hsudc_ep_disable(struct usb_ep *_ep)
struct s3c_hsudc *hsudc = hsep->dev; struct s3c_hsudc *hsudc = hsep->dev;
unsigned long flags; unsigned long flags;
if (!_ep || !hsep->desc) if (!_ep || !hsep->ep.desc)
return -EINVAL; return -EINVAL;
spin_lock_irqsave(&hsudc->lock, flags); spin_lock_irqsave(&hsudc->lock, flags);
...@@ -816,7 +815,6 @@ static int s3c_hsudc_ep_disable(struct usb_ep *_ep) ...@@ -816,7 +815,6 @@ static int s3c_hsudc_ep_disable(struct usb_ep *_ep)
s3c_hsudc_nuke_ep(hsep, -ESHUTDOWN); s3c_hsudc_nuke_ep(hsep, -ESHUTDOWN);
hsep->desc = 0;
hsep->ep.desc = NULL; hsep->ep.desc = NULL;
hsep->stopped = 1; hsep->stopped = 1;
...@@ -1006,7 +1004,6 @@ static void s3c_hsudc_initep(struct s3c_hsudc *hsudc, ...@@ -1006,7 +1004,6 @@ static void s3c_hsudc_initep(struct s3c_hsudc *hsudc,
hsep->ep.maxpacket = epnum ? 512 : 64; hsep->ep.maxpacket = epnum ? 512 : 64;
hsep->ep.ops = &s3c_hsudc_ep_ops; hsep->ep.ops = &s3c_hsudc_ep_ops;
hsep->fifo = hsudc->regs + S3C_BR(epnum); hsep->fifo = hsudc->regs + S3C_BR(epnum);
hsep->desc = 0;
hsep->ep.desc = NULL; hsep->ep.desc = NULL;
hsep->stopped = 0; hsep->stopped = 0;
hsep->wedge = 0; hsep->wedge = 0;
......
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