[PATCH] mtd: nand_base: replace ifdef with IS_ENABLE

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Signed-off-by: Antony Pavlov <antonynpavlov@xxxxxxxxx>
---
 drivers/mtd/nand/nand_base.c | 14 +++++++-------
 1 file changed, 7 insertions(+), 7 deletions(-)

diff --git a/drivers/mtd/nand/nand_base.c b/drivers/mtd/nand/nand_base.c
index 2b3f9a9..bf4110a 100644
--- a/drivers/mtd/nand/nand_base.c
+++ b/drivers/mtd/nand/nand_base.c
@@ -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. */
-- 
2.5.0


_______________________________________________
barebox mailing list
barebox@xxxxxxxxxxxxxxxxxxx
http://lists.infradead.org/mailman/listinfo/barebox



[Index of Archives]     [Linux Embedded]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux