Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 280823
b: refs/heads/master
c: 457d3f2
h: refs/heads/master
i:
  280821: 738a957
  280819: 911367d
  280815: 6c5c3f0
v: v3
  • Loading branch information
Felipe Balbi committed Dec 12, 2011
1 parent ce9b7f0 commit 3570581
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 3 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: 5ddcee27c19e36711992a0e6ed3249fd06faa0e7
refs/heads/master: 457d3f214f97783c392dd4d64e2427c121b1a4d6
6 changes: 6 additions & 0 deletions trunk/drivers/usb/dwc3/core.c
Original file line number Diff line number Diff line change
Expand Up @@ -221,6 +221,12 @@ static int __devinit dwc3_alloc_event_buffers(struct dwc3 *dwc, unsigned length)
num = DWC3_NUM_INT(dwc->hwparams.hwparams1);
dwc->num_event_buffers = num;

dwc->ev_buffs = kzalloc(sizeof(*dwc->ev_buffs) * num, GFP_KERNEL);
if (!dwc->ev_buffs) {
dev_err(dwc->dev, "can't allocate event buffers array\n");
return -ENOMEM;
}

for (i = 0; i < num; i++) {
struct dwc3_event_buffer *evt;

Expand Down
3 changes: 1 addition & 2 deletions trunk/drivers/usb/dwc3/core.h
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,6 @@
/* Global constants */
#define DWC3_ENDPOINTS_NUM 32

#define DWC3_EVENT_BUFFERS_MAX 2
#define DWC3_EVENT_BUFFERS_SIZE PAGE_SIZE
#define DWC3_EVENT_TYPE_MASK 0xfe

Expand Down Expand Up @@ -603,7 +602,7 @@ struct dwc3 {
struct platform_device *xhci;
struct resource *res;

struct dwc3_event_buffer *ev_buffs[DWC3_EVENT_BUFFERS_MAX];
struct dwc3_event_buffer **ev_buffs;
struct dwc3_ep *eps[DWC3_ENDPOINTS_NUM];

struct usb_gadget gadget;
Expand Down

0 comments on commit 3570581

Please sign in to comment.