From: Heinrich Schuchardt <xypron.glpk@gmx.de>
Date: Tue, 26 May 2020 16:34:15 +0000 (+0200)
Subject: cmd: fitupd: move config check to Kconfig
X-Git-Tag: v2025.01-rc5-pxa1908~2377^2~5
X-Git-Url: http://git.dujemihanovic.xyz/%22http:/kyber.dk/phpMyBuilder/static/%7B%7B%20%28.OutputFormats.Get?a=commitdiff_plain;h=8e8059ccc55a3725046e628c87450dbc41e1a504;p=u-boot.git

cmd: fitupd: move config check to Kconfig

Configuration checks should not be in the C files but in the Kconfig files.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Tom Rini <trini@konsulko.com>
---

diff --git a/cmd/Kconfig b/cmd/Kconfig
index 153864c587..192b3b262f 100644
--- a/cmd/Kconfig
+++ b/cmd/Kconfig
@@ -491,6 +491,7 @@ config CMD_SPL_WRITE_SIZE
 
 config CMD_FITUPD
 	bool "fitImage update command"
+	depends on UPDATE_TFTP
 	help
 	  Implements the 'fitupd' command, which allows to automatically
 	  store software updates present on a TFTP server in NOR Flash
diff --git a/cmd/fitupd.c b/cmd/fitupd.c
index f6270d9c15..0f490c58fc 100644
--- a/cmd/fitupd.c
+++ b/cmd/fitupd.c
@@ -8,10 +8,6 @@
 #include <command.h>
 #include <net.h>
 
-#if !defined(CONFIG_UPDATE_TFTP)
-#error "CONFIG_UPDATE_TFTP required"
-#endif
-
 static int do_fitupd(struct cmd_tbl *cmdtp, int flag, int argc,
 		     char *const argv[])
 {