aboutsummaryrefslogtreecommitdiff
path: root/drivers/mmc/mmc_legacy.c
diff options
context:
space:
mode:
authorTom Rini <trini@konsulko.com>2019-07-14 09:05:20 -0400
committerTom Rini <trini@konsulko.com>2019-07-14 09:05:20 -0400
commit6070ef409c1018860e8dd1f077297546d9d80115 (patch)
treeff914035d376420d37fd2d3d1ad0877220eed9c6 /drivers/mmc/mmc_legacy.c
parenta9758ece08bceb60634145c2126582e5d282bd09 (diff)
parentae8d23a668755d804748a1cf848426b28338b3d5 (diff)
Merge branch '2019-07-12-master-imports'
- First round of TI Davinci updates - Some OMAP3 DM updates - Other misc updates
Diffstat (limited to 'drivers/mmc/mmc_legacy.c')
-rw-r--r--drivers/mmc/mmc_legacy.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/drivers/mmc/mmc_legacy.c b/drivers/mmc/mmc_legacy.c
index 66a7cda440..b0f5cf58a2 100644
--- a/drivers/mmc/mmc_legacy.c
+++ b/drivers/mmc/mmc_legacy.c
@@ -150,6 +150,15 @@ struct mmc *mmc_create(const struct mmc_config *cfg, void *priv)
{
struct mmc *mmc = &mmc_static;
+ /* First MMC device registered, fail to register a new one.
+ * Given users are not expecting this to fail, instead
+ * of failing let's just return the only MMC device
+ */
+ if (mmc->cfg) {
+ debug("Warning: MMC_TINY doesn't support multiple MMC devices\n");
+ return mmc;
+ }
+
mmc->cfg = cfg;
mmc->priv = priv;