]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
mmc: remove duplicate mmc_get_env_dev() implementations
authorDavid Woodhouse <dwmw2@infradead.org>
Tue, 4 Aug 2020 09:05:46 +0000 (10:05 +0100)
committerTom Rini <trini@konsulko.com>
Wed, 14 Oct 2020 15:16:34 +0000 (11:16 -0400)
Since it's so trivial I could just about tolerate this when there were only
two copies of it. But now there are about to be three.

Signed-off-by: David Woodhouse <dwmw2@infradead.org>
drivers/mmc/mmc.c
env/fat.c
env/mmc.c

index d79cdef62ed21d1ce1993074cd625ba98f2d805e..11ce110df3e6962d7e0c8a3aa271313c5c9e071e 100644 (file)
@@ -3111,3 +3111,12 @@ int mmc_set_bkops_enable(struct mmc *mmc)
        return 0;
 }
 #endif
+
+__weak int mmc_get_env_dev(void)
+{
+#ifdef CONFIG_SYS_MMC_ENV_DEV
+       return CONFIG_SYS_MMC_ENV_DEV;
+#else
+       return 0;
+#endif
+}
index 71bf8bfa18f9f99f158688f50706e85a99197ce9..653a38fd937c8d998ce719b0a911de68599f29ad 100644 (file)
--- a/env/fat.c
+++ b/env/fat.c
 # define LOADENV
 #endif
 
-__weak int mmc_get_env_dev(void)
-{
-#ifdef CONFIG_SYS_MMC_ENV_DEV
-       return CONFIG_SYS_MMC_ENV_DEV;
-#else
-       return 0;
-#endif
-}
-
 static char *env_fat_device_and_part(void)
 {
 #ifdef CONFIG_MMC
index ba872701b0d5bd9210eeb4329ee1060218d35154..4e67180b23a0ba0449072720f9caf54d85d7be47 100644 (file)
--- a/env/mmc.c
+++ b/env/mmc.c
 
 DECLARE_GLOBAL_DATA_PTR;
 
-__weak int mmc_get_env_dev(void)
-{
-       return CONFIG_SYS_MMC_ENV_DEV;
-}
-
 #if CONFIG_IS_ENABLED(OF_CONTROL)
 static inline int mmc_offset_try_partition(const char *str, int copy, s64 *val)
 {