Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 303795
b: refs/heads/master
c: fa42e52
h: refs/heads/master
i:
  303793: 8c6b158
  303791: 8f25233
v: v3
  • Loading branch information
Ido Shayevitz authored and Felipe Balbi committed May 4, 2012
1 parent f97a89a commit 882b67a
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 10 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: 9e658f2600dc37158b17c3d63daeaf2e55915d35
refs/heads/master: fa42e52ba4bdd80c4edea4664be7e4f01c587932
14 changes: 6 additions & 8 deletions trunk/drivers/usb/gadget/s3c2410_udc.c
Original file line number Diff line number Diff line change
Expand Up @@ -1062,7 +1062,7 @@ static int s3c2410_udc_ep_enable(struct usb_ep *_ep,

ep = to_s3c2410_ep(_ep);

if (!_ep || !desc || ep->desc
if (!_ep || !desc || ep->ep.desc
|| _ep->name == ep0name
|| desc->bDescriptorType != USB_DT_ENDPOINT)
return -EINVAL;
Expand All @@ -1075,7 +1075,7 @@ static int s3c2410_udc_ep_enable(struct usb_ep *_ep,

local_irq_save (flags);
_ep->maxpacket = max & 0x7ff;
ep->desc = desc;
ep->ep.desc = desc;
ep->halted = 0;
ep->bEndpointAddress = desc->bEndpointAddress;

Expand Down Expand Up @@ -1136,7 +1136,7 @@ static int s3c2410_udc_ep_disable(struct usb_ep *_ep)
unsigned long flags;
u32 int_en_reg;

if (!_ep || !ep->desc) {
if (!_ep || !ep->ep.desc) {
dprintk(DEBUG_NORMAL, "%s not enabled\n",
_ep ? ep->ep.name : NULL);
return -EINVAL;
Expand All @@ -1146,7 +1146,6 @@ static int s3c2410_udc_ep_disable(struct usb_ep *_ep)

dprintk(DEBUG_NORMAL, "ep_disable: %s\n", _ep->name);

ep->desc = NULL;
ep->ep.desc = NULL;
ep->halted = 1;

Expand Down Expand Up @@ -1195,7 +1194,7 @@ s3c2410_udc_free_request(struct usb_ep *_ep, struct usb_request *_req)

dprintk(DEBUG_VERBOSE, "%s(%p,%p)\n", __func__, _ep, _req);

if (!ep || !_req || (!ep->desc && _ep->name != ep0name))
if (!ep || !_req || (!ep->ep.desc && _ep->name != ep0name))
return;

WARN_ON (!list_empty (&req->queue));
Expand All @@ -1215,7 +1214,7 @@ static int s3c2410_udc_queue(struct usb_ep *_ep, struct usb_request *_req,
int fifo_count = 0;
unsigned long flags;

if (unlikely (!_ep || (!ep->desc && ep->ep.name != ep0name))) {
if (unlikely(!_ep || (!ep->ep.desc && ep->ep.name != ep0name))) {
dprintk(DEBUG_NORMAL, "%s: invalid args\n", __func__);
return -EINVAL;
}
Expand Down Expand Up @@ -1363,7 +1362,7 @@ static int s3c2410_udc_set_halt(struct usb_ep *_ep, int value)
unsigned long flags;
u32 idx;

if (unlikely (!_ep || (!ep->desc && ep->ep.name != ep0name))) {
if (unlikely(!_ep || (!ep->ep.desc && ep->ep.name != ep0name))) {
dprintk(DEBUG_NORMAL, "%s: inval 2\n", __func__);
return -EINVAL;
}
Expand Down Expand Up @@ -1629,7 +1628,6 @@ static void s3c2410_udc_reinit(struct s3c2410_udc *dev)
list_add_tail (&ep->ep.ep_list, &dev->gadget.ep_list);

ep->dev = dev;
ep->desc = NULL;
ep->ep.desc = NULL;
ep->halted = 0;
INIT_LIST_HEAD (&ep->queue);
Expand Down
1 change: 0 additions & 1 deletion trunk/drivers/usb/gadget/s3c2410_udc.h
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ struct s3c2410_ep {
unsigned long last_io; /* jiffies timestamp */
struct usb_gadget *gadget;
struct s3c2410_udc *dev;
const struct usb_endpoint_descriptor *desc;
struct usb_ep ep;
u8 num;

Expand Down

0 comments on commit 882b67a

Please sign in to comment.