From: Heikki Krogerus <heikki.krogerus@linux.intel.com>
To: Felipe Balbi <balbi@ti.com>
Cc: "Rafael J. Wysocki" <rafael.j.wysocki@intel.com>,
Mika Westerberg <mika.westerberg@linux.intel.com>,
Alan Cox <alan@linux.intel.com>,
linux-kernel@vger.kernel.org, linux-acpi@vger.kernel.org
Subject: [PATCH 3/4] usb: dwc3: core: only setting the dma_mask when needed
Date: Wed, 20 Aug 2014 14:55:27 +0300 [thread overview]
Message-ID: <1408535728-10518-4-git-send-email-heikki.krogerus@linux.intel.com> (raw)
In-Reply-To: <1408535728-10518-1-git-send-email-heikki.krogerus@linux.intel.com>
If the probe drivers have already set the dma_mask, not
replacing the value.
Signed-off-by: Heikki Krogerus <heikki.krogerus@linux.intel.com>
---
drivers/usb/dwc3/core.c | 8 +++++---
1 file changed, 5 insertions(+), 3 deletions(-)
diff --git a/drivers/usb/dwc3/core.c b/drivers/usb/dwc3/core.c
index b769c1f..3f307f6 100644
--- a/drivers/usb/dwc3/core.c
+++ b/drivers/usb/dwc3/core.c
@@ -711,9 +711,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);
--
2.1.0
next prev parent reply other threads:[~2014-08-20 11:55 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-08-20 11:55 [PATCH 0/4] usb: dwc3: ACPI support Heikki Krogerus
2014-08-20 11:55 ` [PATCH 1/4] usb: dwc3: pci: Add PCI ID for Intel Braswell Heikki Krogerus
2014-08-20 11:55 ` [PATCH 2/4] ACPI / platform: provide default DMA mask Heikki Krogerus
2014-09-23 12:17 ` Heikki Krogerus
2014-09-23 14:52 ` Rafael J. Wysocki
2014-09-23 14:52 ` Felipe Balbi
2014-09-23 15:17 ` Rafael J. Wysocki
2014-09-23 15:29 ` Felipe Balbi
2014-09-23 16:05 ` Rafael J. Wysocki
2014-09-24 6:30 ` Heikki Krogerus
2014-08-20 11:55 ` Heikki Krogerus [this message]
2014-08-20 11:55 ` [PATCH 4/4] usb: dwc3: add ACPI support Heikki Krogerus
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1408535728-10518-4-git-send-email-heikki.krogerus@linux.intel.com \
--to=heikki.krogerus@linux.intel.com \
--cc=alan@linux.intel.com \
--cc=balbi@ti.com \
--cc=linux-acpi@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mika.westerberg@linux.intel.com \
--cc=rafael.j.wysocki@intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Powered by JetHome