From mboxrd@z Thu Jan 1 00:00:00 1970 Return-path: Received: from metis.ext.pengutronix.de ([2001:6f8:1178:4:290:27ff:fe1d:cc33]) by merlin.infradead.org with esmtps (Exim 4.76 #1 (Red Hat Linux)) id 1Smrra-0002DZ-RS for barebox@lists.infradead.org; Thu, 05 Jul 2012 19:37:57 +0000 From: Sascha Hauer Date: Thu, 5 Jul 2012 21:36:43 +0200 Message-Id: <1341517020-5581-13-git-send-email-s.hauer@pengutronix.de> In-Reply-To: <1341517020-5581-1-git-send-email-s.hauer@pengutronix.de> References: <1341517020-5581-1-git-send-email-s.hauer@pengutronix.de> List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: barebox-bounces@lists.infradead.org Errors-To: barebox-bounces+u.kleine-koenig=pengutronix.de@lists.infradead.org Subject: [PATCH 13/30] mtd nand: Fix compilation without bbt support To: barebox@lists.infradead.org Signed-off-by: Sascha Hauer --- drivers/mtd/nand/nand_write.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/drivers/mtd/nand/nand_write.c b/drivers/mtd/nand/nand_write.c index 13b6c89..5ed04ce 100644 --- a/drivers/mtd/nand/nand_write.c +++ b/drivers/mtd/nand/nand_write.c @@ -72,7 +72,7 @@ int nand_default_block_markbad(struct mtd_info *mtd, loff_t ofs) chip->bbt[block >> 2] |= 0x01 << ((block & 0x03) << 1); /* Do we have a flash based bad block table ? */ - if (chip->options & NAND_USE_FLASH_BBT) + if (IS_ENABLED(CONFIG_NAND_BBT) && chip->options & NAND_USE_FLASH_BBT) ret = nand_update_bbt(mtd, ofs); else { /* We write two bytes, so we dont have to mess with 16 bit @@ -711,6 +711,9 @@ int nand_erase_nand(struct mtd_info *mtd, struct erase_info *instr, if (bbt_masked_page == 0xffffffff || ret) return ret; + if (!IS_ENABLED(CONFIG_NAND_BBT)) + return ret; + for (chipnr = 0; chipnr < chip->numchips; chipnr++) { if (!rewrite_bbt[chipnr]) continue; -- 1.7.10 _______________________________________________ barebox mailing list barebox@lists.infradead.org http://lists.infradead.org/mailman/listinfo/barebox