]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
mmc: mmc_mode_name() is used also when LOGLEVEL >= LOGL_DEBUG
authorPali Rohár <pali@kernel.org>
Sat, 2 Apr 2022 22:20:10 +0000 (00:20 +0200)
committerPriyanka Jain <priyanka.jain@nxp.com>
Tue, 26 Apr 2022 11:48:39 +0000 (17:18 +0530)
When CONFIG_LOGLEVEL is set to LOGL_DEBUG or higher then linker throws
error about undefined symbol mmc_mode_name(). So compile mmc_mode_name()
also when CONFIG_LOGLEVEL is set to LOGL_DEBUG or higher.

Signed-off-by: Pali Rohár <pali@kernel.org>
Reviewed-by: Priyanka Jain <priyanka.jain@nxp.com>
drivers/mmc/mmc.c

index f6ccd837aa40dcd14e77f9629528a29a5a527e05..8a7d0739006ccc705396fe559d019a49d2366961 100644 (file)
@@ -132,7 +132,7 @@ void mmc_trace_state(struct mmc *mmc, struct mmc_cmd *cmd)
 }
 #endif
 
-#if CONFIG_IS_ENABLED(MMC_VERBOSE) || defined(DEBUG)
+#if CONFIG_IS_ENABLED(MMC_VERBOSE) || defined(DEBUG) || CONFIG_VAL(LOGLEVEL) >= LOGL_DEBUG
 const char *mmc_mode_name(enum bus_mode mode)
 {
        static const char *const names[] = {