mail archive of the barebox mailing list
 help / color / mirror / Atom feed
From: Sascha Hauer <s.hauer@pengutronix.de>
To: barebox@lists.infradead.org
Subject: [PATCH 4/7] mci: set name of mci device to same name as the filename
Date: Mon, 27 May 2013 10:52:52 +0200	[thread overview]
Message-ID: <1369644775-29887-5-git-send-email-s.hauer@pengutronix.de> (raw)
In-Reply-To: <1369644775-29887-1-git-send-email-s.hauer@pengutronix.de>

We already have the possibility to register a mci with a certain
filename to get persistent names. However, the device needed to
find the probe parameter still has the name 'mcix'. This patch
changes this by registering the mci device with the same name
as the filename.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
---
 drivers/mci/mci-core.c | 10 ++++++++--
 1 file changed, 8 insertions(+), 2 deletions(-)

diff --git a/drivers/mci/mci-core.c b/drivers/mci/mci-core.c
index 1aa98db..4a463d5 100644
--- a/drivers/mci/mci-core.c
+++ b/drivers/mci/mci-core.c
@@ -1608,8 +1608,14 @@ int mci_register(struct mci_host *host)
 	mci = xzalloc(sizeof(*mci));
 	mci->host = host;
 
-	strcpy(mci->dev.name, "mci");
-	mci->dev.id = DEVICE_ID_DYNAMIC;
+	if (host->devname) {
+		strcpy(mci->dev.name, host->devname);
+		mci->dev.id = DEVICE_ID_SINGLE;
+	} else {
+		strcpy(mci->dev.name, "mci");
+		mci->dev.id = DEVICE_ID_DYNAMIC;
+	}
+
 	mci->dev.platform_data = host;
 	mci->dev.parent = host->hw_dev;
 
-- 
1.8.2.rc2


_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

  parent reply	other threads:[~2013-05-27  8:53 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-05-27  8:52 [PATCH] MCI patches Sascha Hauer
2013-05-27  8:52 ` [PATCH 1/7] driver: Attach info callback to device, not to driver Sascha Hauer
2013-05-27  8:52 ` [PATCH 2/7] mci: make mci device a pure device Sascha Hauer
2013-05-27  8:52 ` [PATCH 3/7] mci: embed mci device into struct mci Sascha Hauer
2013-05-27  8:52 ` Sascha Hauer [this message]
2013-05-27  8:52 ` [PATCH 5/7] of: Add of_alias_get function Sascha Hauer
2013-05-27  8:52 ` [PATCH 6/7] mci: imx-esdhc: allow to specify devicename via OF alias Sascha Hauer
2013-05-27  8:52 ` [PATCH 7/7] ARM: i.MX51: Add aliases for MMC controllers Sascha Hauer

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=1369644775-29887-5-git-send-email-s.hauer@pengutronix.de \
    --to=s.hauer@pengutronix.de \
    --cc=barebox@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