Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 303797
b: refs/heads/master
c: 955846a
h: refs/heads/master
i:
  303795: 882b67a
v: v3
  • Loading branch information
Ido Shayevitz authored and Felipe Balbi committed May 4, 2012
1 parent eb53d9b commit e81a07e
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 7 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 0ff21e0e9cdeb156d0872446fa5e49fb0aae76fd
refs/heads/master: 955846a60a9db884d6a5b644876a96b806a48a8d
9 changes: 3 additions & 6 deletions trunk/drivers/usb/gadget/s3c-hsudc.c
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,6 @@ struct s3c_hsudc_ep {
struct usb_ep ep;
char name[20];
struct s3c_hsudc *dev;
const struct usb_endpoint_descriptor *desc;
struct list_head queue;
u8 stopped;
u8 wedge;
Expand Down Expand Up @@ -761,7 +760,7 @@ static int s3c_hsudc_ep_enable(struct usb_ep *_ep,
u32 ecr = 0;

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
|| hsep->bEndpointAddress != desc->bEndpointAddress
|| ep_maxpacket(hsep) < usb_endpoint_maxp(desc))
Expand All @@ -783,7 +782,7 @@ static int s3c_hsudc_ep_enable(struct usb_ep *_ep,
writel(ecr, hsudc->regs + S3C_ECR);

hsep->stopped = hsep->wedge = 0;
hsep->desc = desc;
hsep->ep.desc = desc;
hsep->ep.maxpacket = usb_endpoint_maxp(desc);

s3c_hsudc_set_halt(_ep, 0);
Expand All @@ -806,7 +805,7 @@ static int s3c_hsudc_ep_disable(struct usb_ep *_ep)
struct s3c_hsudc *hsudc = hsep->dev;
unsigned long flags;

if (!_ep || !hsep->desc)
if (!_ep || !hsep->ep.desc)
return -EINVAL;

spin_lock_irqsave(&hsudc->lock, flags);
Expand All @@ -816,7 +815,6 @@ static int s3c_hsudc_ep_disable(struct usb_ep *_ep)

s3c_hsudc_nuke_ep(hsep, -ESHUTDOWN);

hsep->desc = 0;
hsep->ep.desc = NULL;
hsep->stopped = 1;

Expand Down Expand Up @@ -1006,7 +1004,6 @@ static void s3c_hsudc_initep(struct s3c_hsudc *hsudc,
hsep->ep.maxpacket = epnum ? 512 : 64;
hsep->ep.ops = &s3c_hsudc_ep_ops;
hsep->fifo = hsudc->regs + S3C_BR(epnum);
hsep->desc = 0;
hsep->ep.desc = NULL;
hsep->stopped = 0;
hsep->wedge = 0;
Expand Down

0 comments on commit e81a07e

Please sign in to comment.