Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 50919848 authored by Boris Brezillon's avatar Boris Brezillon Committed by Miquel Raynal
Browse files

mtd: spinand: Implement mtd->_max_bad_blocks



We just have to use nanddev_mtd_max_bad_blocks().

Signed-off-by: default avatarBoris Brezillon <bbrezillon@kernel.org>
Signed-off-by: default avatarMiquel Raynal <miquel.raynal@bootlin.com>
Reviewed-by: default avatarFrieder Schrempf <frieder.schrempf@kontron.de>
parent 46b01d7e
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -1037,6 +1037,7 @@ static int spinand_init(struct spinand_device *spinand)
	mtd->_block_markbad = spinand_mtd_block_markbad;
	mtd->_block_isreserved = spinand_mtd_block_isreserved;
	mtd->_erase = spinand_mtd_erase;
	mtd->_max_bad_blocks = nanddev_mtd_max_bad_blocks;

	if (spinand->eccinfo.ooblayout)
		mtd_set_ooblayout(mtd, spinand->eccinfo.ooblayout);