From: Thomas Petazzoni Date: Tue, 15 Aug 2017 22:52:45 +0200 Subject: [U-Boot] [PATCH 2/2] arch/arm/cpu/arm926ejs/spear/cpu.c: guard do_switch_ecc() with CONFIG_NAND_FSMC In-Reply-To: <20170815205245.21496-1-thomas.petazzoni@free-electrons.com> References: <20170815205245.21496-1-thomas.petazzoni@free-electrons.com> Message-ID: <20170815205245.21496-2-thomas.petazzoni@free-electrons.com> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de do_switch_ecc() calls fsmc_nand_switch_ecc(), which is a direct function call into drivers/mtd/nand/fsmc_nand.c. However, this function is not guarded by CONFIG_NAND_FSMC, which results to a build failure if CONFIG_NAND_FSMC is disabled. Signed-off-by: Thomas Petazzoni --- arch/arm/cpu/arm926ejs/spear/cpu.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/arm/cpu/arm926ejs/spear/cpu.c b/arch/arm/cpu/arm926ejs/spear/cpu.c index be0d14f..7b9dc65 100644 --- a/arch/arm/cpu/arm926ejs/spear/cpu.c +++ b/arch/arm/cpu/arm926ejs/spear/cpu.c @@ -84,7 +84,7 @@ int print_cpuinfo(void) } #endif -#if !defined(CONFIG_SPL_BUILD) && defined(CONFIG_NAND_ECC_BCH) +#if !defined(CONFIG_SPL_BUILD) && defined(CONFIG_NAND_ECC_BCH) && defined(CONFIG_NAND_FSMC) static int do_switch_ecc(cmd_tbl_t *cmdtp, int flag, int argc, char *const argv[]) { -- 2.9.4