summaryrefslogtreecommitdiffstats
path: root/drivers/mmc/host
diff options
context:
space:
mode:
authorTony Lindgren <tony@atomide.com>2016-04-26 16:46:23 -0700
committerUlf Hansson <ulf.hansson@linaro.org>2016-05-02 10:35:45 +0200
commitdb863d8966818d3af3e415b5f60fcfeceba803c6 (patch)
treeb827a53d3073baca429a0c4ee295643b0ad1ce0e /drivers/mmc/host
parentab22f516715086760cd01862d60afc0dd3ff30b3 (diff)
downloadlinux-db863d8966818d3af3e415b5f60fcfeceba803c6.tar.bz2
mmc: omap_hsmmc: Check if MMC slot name is passed in pdata
The legacy user space for n900 relies on the MMC slot names. Let's check if those are passed in pdata and use them. As this makes the DT booting compatible with legacy booting, we should be able to start dropping omap3 legacy booting support in v4.8. Cc: Ulf Hansson <ulf.hansson@linaro.org> Cc: Kishon Vijay Abraham I <kishon@ti.com> Cc: linux-mmc@vger.kernel.org Signed-off-by: Tony Lindgren <tony@atomide.com> Tested-by: Ivaylo Dimitrov <ivo.g.dimitrov.75@gmail.com> Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
Diffstat (limited to 'drivers/mmc/host')
-rw-r--r--drivers/mmc/host/omap_hsmmc.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/drivers/mmc/host/omap_hsmmc.c b/drivers/mmc/host/omap_hsmmc.c
index e9d75c6dd516..3563321a3cf3 100644
--- a/drivers/mmc/host/omap_hsmmc.c
+++ b/drivers/mmc/host/omap_hsmmc.c
@@ -1946,13 +1946,17 @@ MODULE_DEVICE_TABLE(of, omap_mmc_of_match);
static struct omap_hsmmc_platform_data *of_get_hsmmc_pdata(struct device *dev)
{
- struct omap_hsmmc_platform_data *pdata;
+ struct omap_hsmmc_platform_data *pdata, *legacy;
struct device_node *np = dev->of_node;
pdata = devm_kzalloc(dev, sizeof(*pdata), GFP_KERNEL);
if (!pdata)
return ERR_PTR(-ENOMEM); /* out of memory */
+ legacy = dev_get_platdata(dev);
+ if (legacy && legacy->name)
+ pdata->name = legacy->name;
+
if (of_find_property(np, "ti,dual-volt", NULL))
pdata->controller_flags |= OMAP_HSMMC_SUPPORTS_DUAL_VOLT;