From abee214ba54640c8f85ae10dc62d4f90446a9c76 Mon Sep 17 00:00:00 2001 From: Sascha Hauer Date: Sun, 26 May 2013 15:27:19 +0200 Subject: mci: set name of mci device to same name as the filename 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 --- drivers/mci/mci-core.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'drivers') diff --git a/drivers/mci/mci-core.c b/drivers/mci/mci-core.c index 8e54941678..416168f79c 100644 --- a/drivers/mci/mci-core.c +++ b/drivers/mci/mci-core.c @@ -1609,8 +1609,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; -- cgit v1.2.3