diff options
author | Mateusz Kulikowski <mateusz.kulikowski@gmail.com> | 2016-06-26 22:43:55 +0200 |
---|---|---|
committer | Tom Rini <trini@konsulko.com> | 2016-07-08 09:57:30 -0400 |
commit | eb9d3ca3560d9348f2db83beb2f51a85806519dd (patch) | |
tree | d263aca0c19c351eb85d42ff8e3df2b99de458f8 /drivers | |
parent | abbaa23f652e18f3df7594b943835c82f8f78c3a (diff) |
mmc: msm_sdhci: Set mmc->dev pointer in msm_sdc_probe()
MMC core expects (now) valid mmc->dev pointer.
During conversion in commit cffe5d86 not every driver was updated.
This patch fixes crash while accessing MMC on
boards using Qualcomm SDHCI controller.
Signed-off-by: Mateusz Kulikowski <mateusz.kulikowski@gmail.com>
Acked-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/mmc/msm_sdhci.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/drivers/mmc/msm_sdhci.c b/drivers/mmc/msm_sdhci.c index 64bbf0cd250..96dcdbec519 100644 --- a/drivers/mmc/msm_sdhci.c +++ b/drivers/mmc/msm_sdhci.c @@ -136,7 +136,12 @@ static int msm_sdc_probe(struct udevice *dev) host->version = sdhci_readw(host, SDHCI_HOST_VERSION); /* automatically detect max and min speed */ - return add_sdhci(host, 0, 0); + ret = add_sdhci(host, 0, 0); + if (ret) + return ret; + host->mmc->dev = dev; + + return 0; } static int msm_sdc_remove(struct udevice *dev) |