[PATCH 4/7] mci: set name of mci device to same name as the filename

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxxxxxx>
---
 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@xxxxxxxxxxxxxxxxxxx
http://lists.infradead.org/mailman/listinfo/barebox




[Index of Archives]     [Linux Embedded]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux