[PATCH 29/30] mtd: scan_write_bbt is only needed with mtd write support

Sascha Hauer s.hauer at pengutronix.de
Thu Jul 5 15:36:59 EDT 2012


Signed-off-by: Sascha Hauer <s.hauer at pengutronix.de>
---
 drivers/mtd/nand/nand_bbt.c |    2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/mtd/nand/nand_bbt.c b/drivers/mtd/nand/nand_bbt.c
index c1696ee..3cbf886 100644
--- a/drivers/mtd/nand/nand_bbt.c
+++ b/drivers/mtd/nand/nand_bbt.c
@@ -254,6 +254,7 @@ static int scan_read_raw(struct mtd_info *mtd, uint8_t *buf, loff_t offs,
 /*
  * Scan write data with oob to flash
  */
+#ifdef CONFIG_MTD_WRITE
 static int scan_write_bbt(struct mtd_info *mtd, loff_t offs, size_t len,
 			  uint8_t *buf, uint8_t *oob)
 {
@@ -268,6 +269,7 @@ static int scan_write_bbt(struct mtd_info *mtd, loff_t offs, size_t len,
 
 	return mtd->write_oob(mtd, offs, &ops);
 }
+#endif
 
 /**
  * read_abs_bbts - [GENERIC] Read the bad block table(s) for all chips starting at a given page
-- 
1.7.10




More information about the barebox mailing list