9
0
Fork 0

mmc: omap: name mmc device after devicetree alias

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
This commit is contained in:
Sascha Hauer 2013-11-22 15:18:23 +01:00
parent fced09ffec
commit 8cf612878e
1 changed files with 6 additions and 0 deletions

View File

@ -620,6 +620,12 @@ static int omap_mmc_probe(struct device_d *dev)
hsmmc->mci.devname = pdata->devname;
}
if (dev->device_node) {
const char *alias = of_alias_get(dev->device_node);
if (alias)
hsmmc->mci.devname = xstrdup(alias);
}
dev->priv = hsmmc;
dev->detect = omap_mmc_detect,