aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/usb/gadget/s3c-hsudc.c
diff options
context:
space:
mode:
authorIdo Shayevitz <idos@codeaurora.org>2012-03-12 14:25:40 -0400
committerFelipe Balbi <balbi@ti.com>2012-05-04 08:53:00 -0400
commit955846a60a9db884d6a5b644876a96b806a48a8d (patch)
treedccd3b04751d2f26e0ce98c1b861302cf9d936fd /drivers/usb/gadget/s3c-hsudc.c
parent0ff21e0e9cdeb156d0872446fa5e49fb0aae76fd (diff)
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: Ido Shayevitz <idos@codeaurora.org> Signed-off-by: Felipe Balbi <balbi@ti.com>
Diffstat (limited to 'drivers/usb/gadget/s3c-hsudc.c')
-rw-r--r--drivers/usb/gadget/s3c-hsudc.c9
1 files changed, 3 insertions, 6 deletions
diff --git a/drivers/usb/gadget/s3c-hsudc.c b/drivers/usb/gadget/s3c-hsudc.c
index cef9b82ff911..36c6836eeb0f 100644
--- a/drivers/usb/gadget/s3c-hsudc.c
+++ b/drivers/usb/gadget/s3c-hsudc.c
@@ -110,7 +110,6 @@ struct s3c_hsudc_ep {
110 struct usb_ep ep; 110 struct usb_ep ep;
111 char name[20]; 111 char name[20];
112 struct s3c_hsudc *dev; 112 struct s3c_hsudc *dev;
113 const struct usb_endpoint_descriptor *desc;
114 struct list_head queue; 113 struct list_head queue;
115 u8 stopped; 114 u8 stopped;
116 u8 wedge; 115 u8 wedge;
@@ -761,7 +760,7 @@ static int s3c_hsudc_ep_enable(struct usb_ep *_ep,
761 u32 ecr = 0; 760 u32 ecr = 0;
762 761
763 hsep = our_ep(_ep); 762 hsep = our_ep(_ep);
764 if (!_ep || !desc || hsep->desc || _ep->name == ep0name 763 if (!_ep || !desc || hsep->ep.desc || _ep->name == ep0name
765 || desc->bDescriptorType != USB_DT_ENDPOINT 764 || desc->bDescriptorType != USB_DT_ENDPOINT
766 || hsep->bEndpointAddress != desc->bEndpointAddress 765 || hsep->bEndpointAddress != desc->bEndpointAddress
767 || ep_maxpacket(hsep) < usb_endpoint_maxp(desc)) 766 || ep_maxpacket(hsep) < usb_endpoint_maxp(desc))
@@ -783,7 +782,7 @@ static int s3c_hsudc_ep_enable(struct usb_ep *_ep,
783 writel(ecr, hsudc->regs + S3C_ECR); 782 writel(ecr, hsudc->regs + S3C_ECR);
784 783
785 hsep->stopped = hsep->wedge = 0; 784 hsep->stopped = hsep->wedge = 0;
786 hsep->desc = desc; 785 hsep->ep.desc = desc;
787 hsep->ep.maxpacket = usb_endpoint_maxp(desc); 786 hsep->ep.maxpacket = usb_endpoint_maxp(desc);
788 787
789 s3c_hsudc_set_halt(_ep, 0); 788 s3c_hsudc_set_halt(_ep, 0);
@@ -806,7 +805,7 @@ static int s3c_hsudc_ep_disable(struct usb_ep *_ep)
806 struct s3c_hsudc *hsudc = hsep->dev; 805 struct s3c_hsudc *hsudc = hsep->dev;
807 unsigned long flags; 806 unsigned long flags;
808 807
809 if (!_ep || !hsep->desc) 808 if (!_ep || !hsep->ep.desc)
810 return -EINVAL; 809 return -EINVAL;
811 810
812 spin_lock_irqsave(&hsudc->lock, flags); 811 spin_lock_irqsave(&hsudc->lock, flags);
@@ -816,7 +815,6 @@ static int s3c_hsudc_ep_disable(struct usb_ep *_ep)
816 815
817 s3c_hsudc_nuke_ep(hsep, -ESHUTDOWN); 816 s3c_hsudc_nuke_ep(hsep, -ESHUTDOWN);
818 817
819 hsep->desc = 0;
820 hsep->ep.desc = NULL; 818 hsep->ep.desc = NULL;
821 hsep->stopped = 1; 819 hsep->stopped = 1;
822 820
@@ -1006,7 +1004,6 @@ static void s3c_hsudc_initep(struct s3c_hsudc *hsudc,
1006 hsep->ep.maxpacket = epnum ? 512 : 64; 1004 hsep->ep.maxpacket = epnum ? 512 : 64;
1007 hsep->ep.ops = &s3c_hsudc_ep_ops; 1005 hsep->ep.ops = &s3c_hsudc_ep_ops;
1008 hsep->fifo = hsudc->regs + S3C_BR(epnum); 1006 hsep->fifo = hsudc->regs + S3C_BR(epnum);
1009 hsep->desc = 0;
1010 hsep->ep.desc = NULL; 1007 hsep->ep.desc = NULL;
1011 hsep->stopped = 0; 1008 hsep->stopped = 0;
1012 hsep->wedge = 0; 1009 hsep->wedge = 0;