]> git.baikalelectronics.ru Git - uboot.git/commit
cfi_flash: Always define cfi_flash_num_flash_banks
authorMario Six <mario.six@gdsys.cc>
Fri, 26 Jan 2018 13:43:56 +0000 (14:43 +0100)
committerStefan Roese <sr@denx.de>
Mon, 29 Jan 2018 06:48:59 +0000 (07:48 +0100)
commit3f7de04656ff770897dae00bfca57f962115c52a
tree3f4768e492018fde0fef196018412bc7c778e014
parente4dab3b5240f367881b3259c5f0df9bf4b7122d6
cfi_flash: Always define cfi_flash_num_flash_banks

The variable cfi_flash_num_flash_banks is defined iff
CONFIG_SYS_MAX_FLASH_BANKS_DETECT is defined, but it is used
unconditionally in the function cfi_flash_init_dm. This leads to a
undefined variable compile error when CONFIG_SYS_MAX_FLASH_BANKS_DETECT
is not defined, but DM is enabled.

Fix this by always defining the cfi_flash_num_flash_banks variable.

Signed-off-by: Mario Six <mario.six@gdsys.cc>
Signed-off-by: Stefan Roese <sr@denx.de>
drivers/mtd/cfi_flash.c