]> git.sur5r.net Git - u-boot/commitdiff
cfi_flash: avoid flash_verbose when possible
authorMike Frysinger <vapier@gentoo.org>
Wed, 22 Dec 2010 14:41:13 +0000 (09:41 -0500)
committerWolfgang Denk <wd@denx.de>
Sun, 9 Jan 2011 17:05:11 +0000 (18:05 +0100)
The flash_verbose logic is only used by the CFI MTD layer, so if we aren't
using that, disable the logic completely.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
drivers/mtd/cfi_flash.c

index b0068842f1c11c8c8eb25595cccc2b961b92a877..1e8d3757f48f5c8ad67b56abe0b8b9700db2d031 100644 (file)
  */
 
 static uint flash_offset_cfi[2] = { FLASH_OFFSET_CFI, FLASH_OFFSET_CFI_ALT };
+#ifdef CONFIG_FLASH_CFI_MTD
 static uint flash_verbose = 1;
+#else
+#define flash_verbose 1
+#endif
 
 flash_info_t flash_info[CFI_MAX_FLASH_BANKS];  /* FLASH chips info */
 
@@ -2042,10 +2046,12 @@ ulong flash_get_size (phys_addr_t base, int banknum)
        return (info->size);
 }
 
+#ifdef CONFIG_FLASH_CFI_MTD
 void flash_set_verbose(uint v)
 {
        flash_verbose = v;
 }
+#endif
 
 static void cfi_flash_set_config_reg(u32 base, u16 val)
 {