summaryrefslogtreecommitdiff
path: root/common/main.c
diff options
context:
space:
mode:
authorGabe Black <gabeblack@chromium.org>2011-07-28 14:11:46 -0700
committerSimon Glass <sjg@chromium.org>2011-08-29 10:59:17 -0700
commit674f812e3c2dde6005ad758ee42e17bd5133a65c (patch)
tree3939e6a9b8017592566ca6c3cbc43040834ac140 /common/main.c
parent5f939ba69cfb57681ed829b92de94f14cf354acc (diff)
Only define the static secure_boot_cmd function if it's going to be used
The secure_boot_cmd was added to main.c recently and was compiled unconditionally but used conditionally. gcc warns if a static function is defined but not used, that was turned into an error, and the build would fail depending on the configuration options chosen. This change makes both the definition and use conditionally compiled. BUG=none TEST=Build for x86-alex (which compiles it out) and tegra2_kaen (which compiles it in). Change-Id: I552eb057b8e1e4cba5d1481b0dc9a7f876a4e81b Signed-off-by: Gabe Black <gabeblack@google.com> Reviewed-on: http://gerrit.chromium.org/gerrit/4954 Tested-by: Gabe Black <gabeblack@chromium.org> Reviewed-by: Doug Anderson <dianders@chromium.org>
Diffstat (limited to 'common/main.c')
-rw-r--r--common/main.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/common/main.c b/common/main.c
index 1f487c7617..1cb247e00b 100644
--- a/common/main.c
+++ b/common/main.c
@@ -281,6 +281,8 @@ static __inline__ int abortboot(int bootdelay)
* printing the error message to console.
*/
+#ifdef CONFIG_OF_CONTROL
+
static void secure_boot_cmd(char *cmd)
{
cmd_tbl_t *cmdtp;
@@ -316,6 +318,8 @@ err:
;
}
+#endif /* CONFIG_OF_CONTROL */
+
/****************************************************************************/