Commit 19bacdc9 authored by Heikki Krogerus's avatar Heikki Krogerus Committed by Felipe Balbi

usb: dwc3: core: only setting the dma_mask when needed

If the probe drivers have already set the dma_mask, not
replacing the value.
Signed-off-by: default avatarHeikki Krogerus <heikki.krogerus@linux.intel.com>
Signed-off-by: default avatarFelipe Balbi <balbi@ti.com>
parent dab716cd
...@@ -715,9 +715,11 @@ static int dwc3_probe(struct platform_device *pdev) ...@@ -715,9 +715,11 @@ static int dwc3_probe(struct platform_device *pdev)
spin_lock_init(&dwc->lock); spin_lock_init(&dwc->lock);
platform_set_drvdata(pdev, dwc); platform_set_drvdata(pdev, dwc);
dev->dma_mask = dev->parent->dma_mask; if (!dev->dma_mask) {
dev->dma_parms = dev->parent->dma_parms; dev->dma_mask = dev->parent->dma_mask;
dma_set_coherent_mask(dev, dev->parent->coherent_dma_mask); dev->dma_parms = dev->parent->dma_parms;
dma_set_coherent_mask(dev, dev->parent->coherent_dma_mask);
}
pm_runtime_enable(dev); pm_runtime_enable(dev);
pm_runtime_get_sync(dev); pm_runtime_get_sync(dev);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment