From mboxrd@z Thu Jan 1 00:00:00 1970 Return-path: Received: from metis.ext.pengutronix.de ([2001:67c:670:201:290:27ff:fe1d:cc33]) by bombadil.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1iahzA-0006n7-6O for barebox@lists.infradead.org; Fri, 29 Nov 2019 15:15:17 +0000 Received: from dude02.hi.pengutronix.de ([2001:67c:670:100:1d::28] helo=dude02.pengutronix.de.) by metis.ext.pengutronix.de with esmtp (Exim 4.92) (envelope-from ) id 1iahz8-0006u0-Oo for barebox@lists.infradead.org; Fri, 29 Nov 2019 16:15:06 +0100 From: Lucas Stach Date: Fri, 29 Nov 2019 16:14:41 +0100 Message-Id: <20191129151505.23946-16-l.stach@pengutronix.de> In-Reply-To: <20191129151505.23946-1-l.stach@pengutronix.de> References: <20191129151505.23946-1-l.stach@pengutronix.de> MIME-Version: 1.0 List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "barebox" Errors-To: barebox-bounces+u.kleine-koenig=pengutronix.de@lists.infradead.org Subject: [PATCH 15/39] mtd: nand: don't call BBT functions if BBT support isn't built To: barebox@lists.infradead.org Signed-off-by: Lucas Stach --- drivers/mtd/nand/nand_base.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/mtd/nand/nand_base.c b/drivers/mtd/nand/nand_base.c index 6b7d01919c59..00f0f7588434 100644 --- a/drivers/mtd/nand/nand_base.c +++ b/drivers/mtd/nand/nand_base.c @@ -407,7 +407,7 @@ static int nand_block_markbad_lowlevel(struct mtd_info *mtd, loff_t ofs) } /* Mark block bad in BBT */ - if (chip->bbt) { + if (IS_ENABLED(CONFIG_NAND_BBT) && chip->bbt) { res = nand_markbad_bbt(mtd, ofs); if (!ret) ret = res; @@ -458,7 +458,7 @@ static int nand_block_markgood_lowlevel(struct mtd_info *mtd, loff_t ofs) } /* Mark block good in BBT */ - if (chip->bbt) { + if (IS_ENABLED(CONFIG_NAND_BBT) && chip->bbt) { ret = nand_markgood_bbt(mtd, ofs); if (ret) return ret; -- 2.20.1 _______________________________________________ barebox mailing list barebox@lists.infradead.org http://lists.infradead.org/mailman/listinfo/barebox