public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
* [U-Boot] [PATCH] MTD: nand: mxs_nand_spl: Fix empty function pointer for BBT
@ 2018-12-30 16:11 Adam Ford
  2019-01-03 15:52 ` Stefan Agner
  2019-01-30  8:57 ` [U-Boot] " sbabic at denx.de
  0 siblings, 2 replies; 4+ messages in thread
From: Adam Ford @ 2018-12-30 16:11 UTC (permalink / raw)
  To: u-boot

The initialization function calls a nand_chip.scan_bbt(mtd) but
scan_bbt is never initialized resulting in an undefined function
pointer.  This will direct the function pointer to nand_default_bbt
defined in the same file.

Signed-off-by: Adam Ford <aford173@gmail.com>

diff --git a/drivers/mtd/nand/raw/mxs_nand_spl.c b/drivers/mtd/nand/raw/mxs_nand_spl.c
index 2d7bbe83cc..c628f3adec 100644
--- a/drivers/mtd/nand/raw/mxs_nand_spl.c
+++ b/drivers/mtd/nand/raw/mxs_nand_spl.c
@@ -185,6 +185,7 @@ static int mxs_nand_init(void)
 	mtd = nand_to_mtd(&nand_chip);
 	/* set mtd functions */
 	nand_chip.cmdfunc = mxs_nand_command;
+	nand_chip.scan_bbt = nand_default_bbt;
 	nand_chip.numchips = 1;
 
 	/* identify flash device */
-- 
2.17.1

^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2019-02-02 15:11 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-12-30 16:11 [U-Boot] [PATCH] MTD: nand: mxs_nand_spl: Fix empty function pointer for BBT Adam Ford
2019-01-03 15:52 ` Stefan Agner
2019-02-02 15:11   ` Jörg Krause
2019-01-30  8:57 ` [U-Boot] " sbabic at denx.de

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox