diff options
author | Heikki Krogerus <heikki.krogerus@linux.intel.com> | 2014-09-24 11:00:38 +0300 |
---|---|---|
committer | Felipe Balbi <balbi@ti.com> | 2014-11-03 10:00:53 -0600 |
commit | 19bacdc925055f020ad36da04bd72dc8b28637b8 (patch) | |
tree | 27c65d380ca59d2b25fb32239e1a61680274e3de | |
parent | dab716cd9aeea6f2b2524523461326aefa219291 (diff) |
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: Heikki Krogerus <heikki.krogerus@linux.intel.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
-rw-r--r-- | drivers/usb/dwc3/core.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/drivers/usb/dwc3/core.c b/drivers/usb/dwc3/core.c index ddfe7718e4a3..13843004815c 100644 --- a/drivers/usb/dwc3/core.c +++ b/drivers/usb/dwc3/core.c @@ -715,9 +715,11 @@ static int dwc3_probe(struct platform_device *pdev) spin_lock_init(&dwc->lock); platform_set_drvdata(pdev, dwc); - dev->dma_mask = dev->parent->dma_mask; - dev->dma_parms = dev->parent->dma_parms; - dma_set_coherent_mask(dev, dev->parent->coherent_dma_mask); + if (!dev->dma_mask) { + dev->dma_mask = dev->parent->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_get_sync(dev); |