usb: dwc3: drop ev_buffs array
we will be using a single event buffer and that
renders ev_buffs array unnecessary. Let's remove it
in favor of a single pointer to a single event
buffer.
Signed-off-by: Felipe Balbi <felipe.balbi@linux.intel.com>
diff --git a/drivers/usb/dwc3/core.c b/drivers/usb/dwc3/core.c
index 9e5c57c7..05b7ec3 100644
--- a/drivers/usb/dwc3/core.c
+++ b/drivers/usb/dwc3/core.c
@@ -204,7 +204,7 @@
{
struct dwc3_event_buffer *evt;
- evt = dwc->ev_buffs[0];
+ evt = dwc->ev_buf;
if (evt)
dwc3_free_one_event_buffer(dwc, evt);
}
@@ -221,17 +221,12 @@
{
struct dwc3_event_buffer *evt;
- dwc->ev_buffs = devm_kzalloc(dwc->dev, sizeof(*dwc->ev_buffs),
- GFP_KERNEL);
- if (!dwc->ev_buffs)
- return -ENOMEM;
-
evt = dwc3_alloc_one_event_buffer(dwc, length);
if (IS_ERR(evt)) {
dev_err(dwc->dev, "can't allocate event buffer\n");
return PTR_ERR(evt);
}
- dwc->ev_buffs[0] = evt;
+ dwc->ev_buf = evt;
return 0;
}
@@ -246,7 +241,7 @@
{
struct dwc3_event_buffer *evt;
- evt = dwc->ev_buffs[0];
+ evt = dwc->ev_buf;
dwc3_trace(trace_dwc3_core,
"Event buf %p dma %08llx length %d\n",
evt->buf, (unsigned long long) evt->dma,
@@ -269,7 +264,7 @@
{
struct dwc3_event_buffer *evt;
- evt = dwc->ev_buffs[0];
+ evt = dwc->ev_buf;
evt->lpos = 0;