linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: zonque@gmail.com (Daniel Mack)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH] mmc: omap_hsmmc: get capabilities from DT
Date: Wed, 14 Aug 2013 22:40:13 +0200	[thread overview]
Message-ID: <1376512813-27892-1-git-send-email-zonque@gmail.com> (raw)

When used in DT mode, the omap hsmmc driver has to take capabilites
given in DT by calling mmc_of_parse().

Signed-off-by: Daniel Mack <zonque@gmail.com>
---
 drivers/mmc/host/omap_hsmmc.c | 10 +++++++++-
 1 file changed, 9 insertions(+), 1 deletion(-)

diff --git a/drivers/mmc/host/omap_hsmmc.c b/drivers/mmc/host/omap_hsmmc.c
index 1865321..31337c1 100644
--- a/drivers/mmc/host/omap_hsmmc.c
+++ b/drivers/mmc/host/omap_hsmmc.c
@@ -1907,7 +1907,15 @@ static int omap_hsmmc_probe(struct platform_device *pdev)
 	if (mmc_slot(host).nonremovable)
 		mmc->caps |= MMC_CAP_NONREMOVABLE;
 
-	mmc->pm_caps = mmc_slot(host).pm_caps;
+	if (pdev->dev.of_node) {
+		ret = mmc_of_parse(mmc);
+		if (ret < 0) {
+			dev_err(&pdev->dev, "mmc_of_parse() failed: %d\n", ret);
+			goto err_irq;
+		}
+	} else {
+		mmc->pm_caps = mmc_slot(host).pm_caps;
+	}
 
 	omap_hsmmc_conf_bus_power(host);
 
-- 
1.8.3.1

             reply	other threads:[~2013-08-14 20:40 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-08-14 20:40 Daniel Mack [this message]
2013-08-25  4:23 ` [PATCH] mmc: omap_hsmmc: get capabilities from DT Chris Ball

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=1376512813-27892-1-git-send-email-zonque@gmail.com \
    --to=zonque@gmail.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    /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;
as well as URLs for NNTP newsgroup(s).