9
0
Fork 0

mtd: nand_base: replace ifdef with IS_ENABLE

Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
This commit is contained in:
Antony Pavlov 2015-08-05 09:10:34 +03:00 committed by Sascha Hauer
parent 99b03a709d
commit 4f37af47a8
1 changed files with 7 additions and 7 deletions

View File

@ -445,15 +445,15 @@ static int nand_block_checkbad(struct mtd_info *mtd, loff_t ofs, int getchip,
{
struct nand_chip *chip = mtd->priv;
#ifdef CONFIG_NAND_BBT
if (!chip->bbt)
return chip->block_bad(mtd, ofs, getchip);
if (IS_ENABLED(CONFIG_NAND_BBT)) {
if (!chip->bbt)
return chip->block_bad(mtd, ofs, getchip);
/* Return info from the table */
return nand_isbad_bbt(mtd, ofs, allowbbt);
}
/* Return info from the table */
return nand_isbad_bbt(mtd, ofs, allowbbt);
#else
return chip->block_bad(mtd, ofs, getchip);
#endif
}
/* Wait for the ready pin, after a command. The timeout is caught later. */