summaryrefslogtreecommitdiffstats
path: root/drivers/mci/mci-core.c
diff options
context:
space:
mode:
authorSascha Hauer <s.hauer@pengutronix.de>2019-01-15 13:43:03 +0100
committerSascha Hauer <s.hauer@pengutronix.de>2019-01-15 13:43:03 +0100
commit01c7daa6bfbd91d10d0450c2eb60a9ba1e8ca0e4 (patch)
tree94707183ee743693edb4aa55bc436579b1c0d635 /drivers/mci/mci-core.c
parent358959c256a46dd0c53ae0855e957ccfd2660a51 (diff)
parent59f7c6e6fa3d9d81074c5ec0f86361917db951de (diff)
downloadbarebox-01c7daa6bfbd91d10d0450c2eb60a9ba1e8ca0e4.tar.gz
barebox-01c7daa6bfbd91d10d0450c2eb60a9ba1e8ca0e4.tar.xz
Merge branch 'for-next/mmc'
Diffstat (limited to 'drivers/mci/mci-core.c')
-rw-r--r--drivers/mci/mci-core.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/drivers/mci/mci-core.c b/drivers/mci/mci-core.c
index 0bd68b15b8..67257bcd18 100644
--- a/drivers/mci/mci-core.c
+++ b/drivers/mci/mci-core.c
@@ -1862,6 +1862,7 @@ void mci_of_parse_node(struct mci_host *host,
{
u32 bus_width;
u32 dsr_val;
+ const char *alias;
if (!IS_ENABLED(CONFIG_OFDEVICE))
return;
@@ -1869,6 +1870,10 @@ void mci_of_parse_node(struct mci_host *host,
if (!host->hw_dev || !np)
return;
+ alias = of_alias_get(np);
+ if (alias)
+ host->devname = xstrdup(alias);
+
/* "bus-width" is translated to MMC_CAP_*_BIT_DATA flags */
if (of_property_read_u32(np, "bus-width", &bus_width) < 0) {
/* If bus-width is missing we get the driver's default, which