diff options
Diffstat (limited to 'drivers/usb/dwc2')
-rw-r--r-- | drivers/usb/dwc2/gadget.c | 9 | ||||
-rw-r--r-- | drivers/usb/dwc2/hcd.c | 6 | ||||
-rw-r--r-- | drivers/usb/dwc2/params.c | 5 | ||||
-rw-r--r-- | drivers/usb/dwc2/platform.c | 4 |
4 files changed, 10 insertions, 14 deletions
diff --git a/drivers/usb/dwc2/gadget.c b/drivers/usb/dwc2/gadget.c index bff48a8a1984..6be10e496e10 100644 --- a/drivers/usb/dwc2/gadget.c +++ b/drivers/usb/dwc2/gadget.c @@ -3224,14 +3224,15 @@ static void kill_all_requests(struct dwc2_hsotg *hsotg, struct dwc2_hsotg_ep *ep, int result) { - struct dwc2_hsotg_req *req, *treq; unsigned int size; ep->req = NULL; - list_for_each_entry_safe(req, treq, &ep->queue, queue) - dwc2_hsotg_complete_request(hsotg, ep, req, - result); + while (!list_empty(&ep->queue)) { + struct dwc2_hsotg_req *req = get_ep_head(ep); + + dwc2_hsotg_complete_request(hsotg, ep, req, result); + } if (!hsotg->dedicated_fifos) return; diff --git a/drivers/usb/dwc2/hcd.c b/drivers/usb/dwc2/hcd.c index 111787a137ee..81afe553aa66 100644 --- a/drivers/usb/dwc2/hcd.c +++ b/drivers/usb/dwc2/hcd.c @@ -5062,13 +5062,13 @@ int dwc2_hcd_init(struct dwc2_hsotg *hsotg) dwc2_hc_driver.reset_device = dwc2_reset_device; } + if (hsotg->params.host_dma) + dwc2_hc_driver.flags |= HCD_DMA; + hcd = usb_create_hcd(&dwc2_hc_driver, hsotg->dev, dev_name(hsotg->dev)); if (!hcd) goto error1; - if (!hsotg->params.host_dma) - hcd->self.uses_dma = 0; - hcd->has_tt = 1; res = platform_get_resource(pdev, IORESOURCE_MEM, 0); diff --git a/drivers/usb/dwc2/params.c b/drivers/usb/dwc2/params.c index 55f841a54015..31e090ac9f1e 100644 --- a/drivers/usb/dwc2/params.c +++ b/drivers/usb/dwc2/params.c @@ -404,10 +404,7 @@ static void dwc2_get_device_properties(struct dwc2_hsotg *hsotg) device_property_read_u32(hsotg->dev, "g-np-tx-fifo-size", &p->g_np_tx_fifo_size); - num = device_property_read_u32_array(hsotg->dev, - "g-tx-fifo-size", - NULL, 0); - + num = device_property_count_u32(hsotg->dev, "g-tx-fifo-size"); if (num > 0) { num = min(num, 15); memset(p->g_tx_fifo_size, 0, diff --git a/drivers/usb/dwc2/platform.c b/drivers/usb/dwc2/platform.c index 80fd3c6dcd1c..3c6ce09a6db5 100644 --- a/drivers/usb/dwc2/platform.c +++ b/drivers/usb/dwc2/platform.c @@ -407,10 +407,8 @@ static int dwc2_driver_probe(struct platform_device *dev) spin_lock_init(&hsotg->lock); hsotg->irq = platform_get_irq(dev, 0); - if (hsotg->irq < 0) { - dev_err(&dev->dev, "missing IRQ resource\n"); + if (hsotg->irq < 0) return hsotg->irq; - } dev_dbg(hsotg->dev, "registering common handler for irq%d\n", hsotg->irq); |