From 26f0df2d8ccf34e8344fcdcec5e315ed639691e4 Mon Sep 17 00:00:00 2001 From: Haibo Chen Date: Tue, 5 Apr 2016 17:43:38 +0800 Subject: [PATCH] MLK-12617 mmc: Fix compile error when CONFIG_MMC=m When CONFIG_MMC=m, compile error shows up ERROR: "of_alias_max_index" [drivers/mmc/core/mmc_core.ko] undefined! ERROR: "mmc_get_reserved_index" [drivers/mmc/card/mmc_block.ko] undefined! ERROR: "mmc_first_nonreserved_index" [drivers/mmc/card/mmc_block.ko] undefined! make[1]: *** [__modpost] Error 1 make: *** [modules] Error 2 make: *** Waiting for unfinished jobs.... This patch export the upper three symbol for module runtime load. Signed-off-by: Haibo Chen (cherry picked from commit 3b2520f17d427b8fa8db37a6d9a4311f20c29036) --- drivers/mmc/core/core.c | 2 ++ drivers/of/base.c | 1 + 2 files changed, 3 insertions(+) diff --git a/drivers/mmc/core/core.c b/drivers/mmc/core/core.c index 7b3e6f309afb..a4439305bc4d 100644 --- a/drivers/mmc/core/core.c +++ b/drivers/mmc/core/core.c @@ -3037,6 +3037,7 @@ int mmc_first_nonreserved_index(void) { return __mmc_max_reserved_idx + 1; } +EXPORT_SYMBOL(mmc_first_nonreserved_index); /** * mmc_get_reserved_index() - get the index reserved for this host @@ -3048,6 +3049,7 @@ int mmc_get_reserved_index(struct mmc_host *host) { return of_alias_get_id(host->parent->of_node, "mmc"); } +EXPORT_SYMBOL(mmc_get_reserved_index); static void mmc_of_reserve_idx(void) { diff --git a/drivers/of/base.c b/drivers/of/base.c index 5fbd49290175..4d6cbfe6a111 100644 --- a/drivers/of/base.c +++ b/drivers/of/base.c @@ -2077,6 +2077,7 @@ int of_alias_max_index(const char *stem) return max; } +EXPORT_SYMBOL_GPL(of_alias_max_index); /** * of_alias_scan - Scan all properties of the 'aliases' node -- 2.17.1